Просмотр исходного кода

无法退出当前家庭问题

zhangdongming 3 лет назад
Родитель
Сommit
9a9b9926d2
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Controller/SensorGateway/GatewayFamilyMemberController.py

+ 1 - 1
Controller/SensorGateway/GatewayFamilyMemberController.py

@@ -185,7 +185,7 @@ class GatewayFamilyMemberView(View):
                     return response.json(0)
                 else:
                     # 成员退出当前家庭
-                    family_member = FamilyMember.objects.filter(user_id=app_user_id, identity=1)
+                    family_member = FamilyMember.objects.filter(family_id=family_id, user_id=app_user_id, identity=1)
                     if family_member.exists():
                         return response.json(173)
                     family_member_qs = FamilyMember.objects.filter(family_id=family_id, user_id=app_user_id)