Commit 9ac79451 authored by haowang's avatar haowang

modify tag filter delete to batch

parent a500ef19
...@@ -186,14 +186,15 @@ class TagFilterCreate(APIView): ...@@ -186,14 +186,15 @@ class TagFilterCreate(APIView):
class TagFilterDelete(APIView): class TagFilterDelete(APIView):
def post(self, request): def post(self, request):
id_ = request.POST.get('id', None)
if not id_: ids = json.loads(request.POST.get('ids', '[]'))
if not ids:
return {'message': '参数不完整'} return {'message': '参数不完整'}
data = self.rpc['venus/sun/tag/filter/delete'](id_=id_).unwrap() for id_ in ids:
data = self.rpc['venus/sun/tag/filter/delete'](id_=id_).unwrap()
if not data: if not data:
return {'message': '操作失败'} return {'message': '操作失败'}
return {'message': '操作成功'} return {'message': '操作成功'}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment