浏览代码

增加排序字段

peng 3 年之前
父节点
当前提交
68bd41c308
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Controller/SensorGateway/GatewayFamilyRoomController.py

+ 1 - 1
Controller/SensorGateway/GatewayFamilyRoomController.py

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