Ver código fonte

修复添加设备旧接口

locky 4 anos atrás
pai
commit
656d91fe5d
1 arquivos alterados com 2 adições e 5 exclusões
  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