Преглед на файлове

修复添加设备旧接口

locky преди 4 години
родител
ревизия
656d91fe5d
променени са 1 файла, в които са добавени 2 реда и са изтрити 5 реда
  1. 2 5
      Controller/EquipmentManager.py

+ 2 - 5
Controller/EquipmentManager.py

@@ -526,13 +526,10 @@ def addInterface(request):
                     # 新增获取IOT证书内容
                     iotqs = iotdeviceInfoModel.objects.filter(serial_number=dvql[0]['serial_number'])
                     if iotqs.exists():
-                        res['iot'].append(
-                            {
+                        res['iot'] = {
                                 'endpoint': iotqs[0].endpoint,
                                 'token_iot_number': iotqs[0].endpoint
-
-                            }
-                        )
+                        }
 
                     if isMainUserExists:
                         res['isMainUserExists'] = 1