|
@@ -698,7 +698,7 @@ class EquipmentFamilyView(View):
|
|
|
room_qs = room_qs.values('id', 'name', 'sort')
|
|
|
room_list = []
|
|
|
if not room_qs.exists():
|
|
|
- return response.json(0, {'total': 0, 'data': room_list, 'deviceTotal': 0})
|
|
|
+ return response.json(0, {'total': 0, 'data': room_list, 'deviceTotal': count})
|
|
|
for item in room_qs:
|
|
|
item['deviceCount'] = FamilyRoomDevice.objects.filter(family_id=family_id, room_id=item['id']).count()
|
|
|
room_list.append(item)
|