Explorar o código

优化添加网关设备的返回结果

guanhailong %!s(int64=2) %!d(string=hai) anos
pai
achega
0399221a3f
Modificáronse 1 ficheiros con 5 adicións e 5 borrados
  1. 5 5
      Controller/SensorGateway/EquipmentFamilyController.py

+ 5 - 5
Controller/SensorGateway/EquipmentFamilyController.py

@@ -216,11 +216,11 @@ class EquipmentFamilyView(View):
                         'tb_country': country
                     }
                     UidSetModel.objects.create(**uid_set_create_dict)
-                    res = {
-                        'id': device_id,
-                        'nickname': nick_name,
-                        'serialNumber': serial_number
-                    }
+                res = {
+                    'id': device_id,
+                    'nickname': nick_name,
+                    'serialNumber': serial_number
+                }
                 return response.json(0, res)
         except Exception as e:
             print(e)