|
@@ -829,10 +829,11 @@ class AiView(View):
|
|
|
is_update = Ai_Push_Info.objects.filter(userID_id=userID).update(status=1)
|
|
|
return response.json(0, {'update_count': is_update})
|
|
|
else:
|
|
|
- id_list = request_dict.getlist('id_list[]', None)
|
|
|
+ id_list = request_dict.get('id_list', None)
|
|
|
if not id_list:
|
|
|
return response.json(444)
|
|
|
- param_flag = CommonService.get_param_flag(data=[id_list])
|
|
|
+ id_list = eval(id_list) # 字符串转列表
|
|
|
+ param_flag = CommonService.get_param_flag(data=id_list)
|
|
|
if not param_flag:
|
|
|
return response.json(444)
|
|
|
count = 0
|
|
@@ -849,11 +850,12 @@ class AiView(View):
|
|
|
return response.json(500, repr(e))
|
|
|
|
|
|
def deleteInfo(self, userID, request_dict, response):
|
|
|
- id_list = request_dict.getlist('id_list[]', None)
|
|
|
+ id_list = request_dict.get('id_list', None)
|
|
|
if not id_list:
|
|
|
return response.json(444)
|
|
|
try:
|
|
|
- param_flag = CommonService.get_param_flag(data=[id_list])
|
|
|
+ id_list = eval(id_list) # 字符串转列表
|
|
|
+ param_flag = CommonService.get_param_flag(data=id_list)
|
|
|
if not param_flag:
|
|
|
return response.json(444)
|
|
|
for id in id_list:
|