Browse Source

查询智能场景日志tasks返回结构体

peng 3 years ago
parent
commit
64c97ccfef
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Controller/SensorGateway/SmartSceneController.py

+ 1 - 1
Controller/SensorGateway/SmartSceneController.py

@@ -737,7 +737,7 @@ class SmartSceneView(View):
                     qs = GatewaySubDevice.objects.filter(id=sub_device_id).values('device_type')
                     item['device_type'] = qs[0]['device_type']
                 item['scene_name'] = smart_scene_qs[0]['scene_name']
-                item['tasks'] = smart_scene_qs[0]['tasks']
+                item['tasks'] = eval(smart_scene_qs[0]['tasks'])
             return response.json(0, list(scene_log_qs))
         except Exception as e:
             print(repr(e))