Explorar o código

post data to formal

chenjunkai %!s(int64=6) %!d(string=hai) anos
pai
achega
4814fa6909
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Controller/DeviceShare.py

+ 1 - 1
Controller/DeviceShare.py

@@ -107,7 +107,7 @@ class DeviceShareView(View):
                 UID = data.get('UID', None)
                 sharerDvqs = Device_Info.objects.filter(userID_id=sharer, UID=UID, isShare=False). \
                     values('NickName', 'Type')
-                if sharerDvqs:
+                if sharerDvqs.exists():
                     sharerDuqs = Device_User.objects.filter(userID=sharer).values('username', 'userEmail', 'phone')
                     if sharerDuqs[0]['username']:
                         share_user = sharerDuqs[0]['username']