yf_yzl 2 years ago
parent
commit
baf40608ea
2 changed files with 1 additions and 2 deletions
  1. 0 1
      smartfarming/utils.py
  2. 1 1
      smartfarming/views/device.py

+ 0 - 1
smartfarming/utils.py

@@ -38,7 +38,6 @@ def perms_pc_app(type_id=1000, perms_lst=[], device_user=None):
             )
         return children_lst
     else:
-
         parent_ids = []
         for p in perms_lst:
             # 先判断是否是父级菜单 

+ 1 - 1
smartfarming/views/device.py

@@ -212,7 +212,7 @@ class QxzDeviceAddAPIViw(APIView):
             request_data = request.body 
             request_data = json.loads(request_data)
             logger.error(f"气象站源数据:{request_data}")
-            device_id = request_data.get("StationID")
+            device_id = request_data.get("StationID", "")
             uptime = request_data.get("MonitorTime")
             data = request_data.get("data")
             terminalStatus = request_data.get("terminalStatus")