浏览代码

不筛选是否是主用户

zhangdongming 3 年之前
父节点
当前提交
4d17503d5c
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      Controller/SensorGateway/EquipmentFamilyController.py

+ 1 - 2
Controller/SensorGateway/EquipmentFamilyController.py

@@ -608,8 +608,7 @@ class EquipmentFamilyView(View):
         if not user_family_qs.exists():
             return response.json(404)
         family_dict = user_family_qs.first()
-        device_count = FamilyRoomDevice.objects.filter(family_id=family_id, sub_device=0,
-                                                       device__primaryUserID=user_id).count()
+        device_count = FamilyRoomDevice.objects.filter(family_id=family_id, sub_device=0).count()
         family_dict['deviceCount'] = device_count
         family_dict['roomCount'] = FamilyRoom.objects.filter(family_id=family_id).count()