|
@@ -249,14 +249,11 @@ class DeviceShareView(View):
|
|
|
|
|
|
def do_delete_userV2(self, userID, request_dict, response):
|
|
|
ids = request_dict.get('ids', None)
|
|
|
- if ids:
|
|
|
- try:
|
|
|
- # redisObj = RedisObject(db=8)
|
|
|
- # redisObj.del_data(key='uid_qs_' + userID)
|
|
|
- Device_Info.objects.filter(id__in=ids.split(','), primaryUserID=userID).update(isExist=0)
|
|
|
- except Exception as e:
|
|
|
- return response.json(10, repr(e))
|
|
|
- else:
|
|
|
- return response.json(0)
|
|
|
- else:
|
|
|
+ if not ids:
|
|
|
return response.json(444, 'id')
|
|
|
+ try:
|
|
|
+ Device_Info.objects.filter(id__in=ids.split(','), primaryUserID=userID).delete()
|
|
|
+ except Exception as e:
|
|
|
+ return response.json(10, repr(e))
|
|
|
+ else:
|
|
|
+ return response.json(0)
|