Эх сурвалжийг харах

修复插座ChangeReport接口存在问题

locky 1 жил өмнө
parent
commit
cdd32b73db

+ 1 - 6
controller/deviceStatus.py

@@ -556,11 +556,6 @@ class deviceStatus(TemplateView):
                 else:
                     return JsonResponse({'code': 102, 'msg': 'get refresh_token fail'})
 
-            endpoints = []
-            for switch in switch_qs:
-                endpointId = {"endpointId": switch.serial_number}
-                endpoints.append(endpointId)
-            switch_qs.delete()
             headers = {
                 "Authorization": "Bearer " + access_token,
                 "Content-Type": "application/json;charset=UTF-8",
@@ -583,7 +578,7 @@ class deviceStatus(TemplateView):
                             "type": "BearerToken",
                             "token": access_token
                         },
-                        "endpoints": endpoints
+                        "endpointId": serial_number
                     },
                     "payload": {
                         "change": {