Explorar el Código

添加智能场景接口修改判断conditions类型

peng hace 3 años
padre
commit
c3daa5de41
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Controller/SensorGateway/SmartSceneController.py

+ 1 - 1
Controller/SensorGateway/SmartSceneController.py

@@ -251,7 +251,7 @@ class SmartSceneView(View):
                     return response.json(444, {'error param': 'invalid isAllDay'})
 
                 msg = {}
-                if conditions_dict['type'] == '2':
+                if conditions_dict['type'] == 2:
                     sub_device_id = conditions_dict['sensor']['subDeviceId']
                     sub_device_qs = GatewaySubDevice.objects.filter(id=sub_device_id).values('src_addr').first()
                     msg['smart_scene_id'] = smart_scene_qs.id