Explorar o código

设备控制更新

yf_yzl %!s(int64=2) %!d(string=hai) anos
pai
achega
989928d10f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      smartfarming/api/views/forecast/worm_lamp.py

+ 1 - 1
smartfarming/api/views/forecast/worm_lamp.py

@@ -1962,7 +1962,7 @@ def xycb_pest_chart(request):
     total_pest_num = 0
     for item in queryset:
         try:
-            device_data = json.loads(item.device_data)
+            device_data = json.loads((str(item.device_data)).replace("'", '"'))
             infr_ct = device_data['infr_ct']
             addtime = item.addtime
             pest_data.append({