소스 검색

修复杀虫灯控制返回值

yf_yzl 2 년 전
부모
커밋
6f9f795522
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      smartfarming/api/views/weather/weather.py

+ 2 - 2
smartfarming/api/views/weather/weather.py

@@ -193,13 +193,13 @@ def qxz_detail(request):
     f_tbegin = request.POST.get('start_time')
     f_tbegin = request.POST.get('start_time')
     f_tend = request.POST.get('end_time')
     f_tend = request.POST.get('end_time')
     device_id = request.POST.get("device_id")
     device_id = request.POST.get("device_id")
-    
     try:
     try:
+
         device = MongoDevice.objects.get(device_id=device_id)
         device = MongoDevice.objects.get(device_id=device_id)
         device_expire = device.device_expire
         device_expire = device.device_expire
         device_expire_time = device.device_expire_time
         device_expire_time = device.device_expire_time
     except Exception as e:
     except Exception as e:
-        logger.error(f"气象站数据:{e}")
+        logger.error(f"气象站数据:{e} {device_id}")
         raise PortError('device_id',"暂无此设备")
         raise PortError('device_id',"暂无此设备")
     
     
     qxz_list = QXZdata_New.objects.filter(device_id=device_id)
     qxz_list = QXZdata_New.objects.filter(device_id=device_id)