瀏覽代碼

master添加异常日志8

tanghongbin 4 年之前
父節點
當前提交
650835e0a1
共有 2 個文件被更改,包括 4 次插入0 次删除
  1. 2 0
      Controller/EquipmentManager.py
  2. 2 0
      Controller/EquipmentManagerV3.py

+ 2 - 0
Controller/EquipmentManager.py

@@ -205,6 +205,8 @@ def modifyUserEquipmentInterface(request):
         return response.json(309)
     try:
         deviceData = json.loads(deviceContent)
+        if deviceData.__contains__('userID_id') or deviceData.__contains__('UID'):
+            return response.json(10, '110')
         dev_info_qs = Device_Info.objects.filter(userID_id=userID, id=id)
         dev_info_qs.update(**deviceData)
     except Exception as e:

+ 2 - 0
Controller/EquipmentManagerV3.py

@@ -152,6 +152,8 @@ class EquipmentManagerV3(View):
         try:
             # deviceData = json.loads(deviceContent)
             deviceData = eval(deviceContent)
+            if deviceData.__contains__('userID_id') or deviceData.__contains__('UID'):
+                return response.json(10, '110')
             # print(deviceData['View_Password'])
             if deviceData.__contains__('View_Password'):
                 deviceData['View_Password'] = self.decode_pwd(deviceData['View_Password'])