chenshibin %!s(int64=4) %!d(string=hai) anos
pai
achega
be21b066ab
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      Controller/EquipmentManager.py
  2. 1 1
      Controller/EquipmentManagerV3.py

+ 1 - 1
Controller/EquipmentManager.py

@@ -387,7 +387,7 @@ def addInterface(request):
                 pass
                 is_bind = Device_Info.objects.filter(UID=UID, isShare=False).values('userID__userID')
                 # 判断是否有已绑定用户
-                if is_bind and isCheckMainUser == 1:
+                if is_bind and isCheckMainUser == '1':
                     isMainUserExists = True
 
                 userName = Device_User.objects.get(userID=userID).username

+ 1 - 1
Controller/EquipmentManagerV3.py

@@ -90,7 +90,7 @@ class EquipmentManagerV3(View):
                         return response.json(10, 'illegal uid: {uid}'.format(uid=UID))
                     is_bind = Device_Info.objects.filter(UID=UID, isShare=False).values('userID__userID')
                     # 判断是否有已绑定用户
-                    if is_bind and isCheckMainUser == 1:
+                    if is_bind and isCheckMainUser == '1':
                         isMainUserExists = True