Commit a500ef19 authored by haowang's avatar haowang

modify tag filter create support batch

parent 4909c6ee
......@@ -167,8 +167,12 @@ class TagFilterList(APIView):
class TagFilterCreate(APIView):
def post(self, request):
tag_name = request.POST.get('tag_name', None)
tag_id = request.POST.get('tag_id', None)
tag_infos = json.loads(request.POST.get('tag_infos', '[]'))
if not tag_infos:
return {'message': '参数不完整'}
for tag_info in tag_infos:
tag_name = tag_info.get('tag_name', None)
tag_id = tag_info.get('tag_id', None)
if not tag_id or not tag_name:
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