Pārlūkot izejas kodu

删除分享次用户时删除数据_2

locky 4 gadi atpakaļ
vecāks
revīzija
33562ea2a2
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      Controller/DeviceShare.py

+ 1 - 1
Controller/DeviceShare.py

@@ -239,7 +239,7 @@ class DeviceShareView(View):
             try:
                 # redisObj = RedisObject(db=8)
                 # redisObj.del_data(key='uid_qs_' + userID)
-                Device_Info.objects.filter(id=id, primaryUserID=userID).update(isExist=0)
+                Device_Info.objects.filter(id=id, primaryUserID=userID).delete()
             except Exception as e:
                 return response.json(10, repr(e))
             else: