Quellcode durchsuchen

修复添加网关设备问题

locky vor 3 Jahren
Ursprung
Commit
50edb6feab
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      Controller/SensorGateway/EquipmentFamilyController.py

+ 2 - 1
Controller/SensorGateway/EquipmentFamilyController.py

@@ -152,7 +152,8 @@ class EquipmentFamilyView(View):
             return response.json(444, {'param': 'nick_name, serial_number, device_type'})
         device_info_qs = Device_Info.objects.filter(serial_number=serial_number, isShare=False)
         if device_info_qs:
-            qs = device_info_qs.values('userID__NickName', 'NickName', 'userID_id')
+            qs = device_info_qs.values('NickName', 'userID_id', 'userID__userEmail', 'userID__phone',
+                                       'userID__username', 'userID__NickName', )
             nickname = qs[0]['NickName']
             device_user_id = qs[0]['userID_id']
             if device_user_id == user_id: