Commit 89ef6c2e authored by 王浩's avatar 王浩

add some value in batch create topic

parent 583f6da7
......@@ -13,6 +13,8 @@ class CreateTopicForBatch(BaseView):
def post(self, request):
user_id = request.POST.get("user_id", 0)
card_level = request.POST.get("card_level")
tag_id = request.POST.get("tag_id")
topic_list = json.loads(request.POST.get("topic_list", '[]'))
if not user_id:
......@@ -45,6 +47,8 @@ class CreateTopicForBatch(BaseView):
tags = item.get("tags") or []
tag_names.extend([tag.replace("#", '').strip() for tag in tags])
item["user_id"] = user_id
item["card_level"] = card_level
item["tag_id"] = tag_id
check_info = Sensitive.check(tag_names)
tags = [tag_name for tag_name, succ in check_info.items() if not succ]
......
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