Explorar o código

修复家庭所有设备接口问题

locky %!s(int64=3) %!d(string=hai) anos
pai
achega
cb67278048
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Controller/SensorGateway/GatewayFamilyRoomController.py

+ 1 - 1
Controller/SensorGateway/GatewayFamilyRoomController.py

@@ -213,7 +213,7 @@ class GatewayFamilyRoomView(View):
             return response.json(444)
         try:
             family_room_device_qs = FamilyRoomDevice.objects.filter(family_id=family_id, sub_device=0).\
-                annotate(device_id=F('device__id'), type=F('device__Type'), nickname=F('device__NickName')).\
+                annotate(type=F('device__Type'), nickname=F('device__NickName')).\
                 values('device_id', 'type', 'nickname', 'room_id').order_by('sort')
             if not family_room_device_qs.exists():
                 return response.json(0, [])