Selaa lähdekoodia

允许设备密码为空

chenjunkai 6 vuotta sitten
vanhempi
commit
0a10430f91
2 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 0 1
      Controller/DeviceShare.py
  2. 1 1
      Controller/EquipmentManager.py

+ 0 - 1
Controller/DeviceShare.py

@@ -61,7 +61,6 @@ class DeviceShareView(View):
         UID = request_dict.get('UID', None)
         UID = request_dict.get('UID', None)
         dvqs = Device_Info.objects.filter(UID=UID, userID_id=userID, isShare=False)
         dvqs = Device_Info.objects.filter(UID=UID, userID_id=userID, isShare=False)
         if dvqs.exists():
         if dvqs.exists():
-            import time
             data = {'sharer': userID, 'UID': UID}
             data = {'sharer': userID, 'UID': UID}
             share_token = jwt.encode(data, 'jwt.#^^&', algorithm='HS256')
             share_token = jwt.encode(data, 'jwt.#^^&', algorithm='HS256')
             share_url = '{SERVER_DOMAIN}deviceShare/confirm?shareToken={shareToken}' \
             share_url = '{SERVER_DOMAIN}deviceShare/confirm?shareToken={shareToken}' \

+ 1 - 1
Controller/EquipmentManager.py

@@ -297,7 +297,7 @@ def addInterface(request):
     View_Password = request_dict.get('View_Password', None)
     View_Password = request_dict.get('View_Password', None)
     Type = request_dict.get('Type', None)
     Type = request_dict.get('Type', None)
     ChannelIndex = request_dict.get('ChannelIndex', None)
     ChannelIndex = request_dict.get('ChannelIndex', None)
-    if all([UID, NickName, View_Account, View_Password, Type, ChannelIndex]):
+    if all([UID, NickName, View_Account, Type, ChannelIndex]):
         tko = TokenObject(token)
         tko = TokenObject(token)
         response.lang = tko.lang
         response.lang = tko.lang
         if tko.code == 0:
         if tko.code == 0: