Browse Source

修复查询设备V3接口问题

locky 3 years ago
parent
commit
de17686be8
1 changed files with 4 additions and 3 deletions
  1. 4 3
      Controller/EquipmentManagerV3.py

+ 4 - 3
Controller/EquipmentManagerV3.py

@@ -746,9 +746,10 @@ class EquipmentManagerV3(View):
             # print('uid搜索缓存')
             data = []
             for index, item in enumerate(result):
-                if uid == item['UID']:
-                    # 加密
-                    item['View_Password'] = self.encrypt_pwd(item['View_Password'])
+                if uid != item['UID']:
+                    continue
+                else:
+                    item['View_Password'] = self.encrypt_pwd(item['View_Password'])  # 加密
                     data.append(item)
                     return response.json(0, data)
                 return response.json(0, data)