Commit 056fca26 authored by 王浩's avatar 王浩

Merge branch 'test' into 'master'

Test

See merge request !57
parents 32f144c4 02f63f7e
...@@ -25,6 +25,7 @@ class CreateTopicForBatch(BaseView): ...@@ -25,6 +25,7 @@ class CreateTopicForBatch(BaseView):
is_online = request.POST.get("is_online", 0) is_online = request.POST.get("is_online", 0)
platform = int(request.POST.get("platform")) platform = int(request.POST.get("platform"))
topic_list = json.loads(request.POST.get("topic_list", '[]')) topic_list = json.loads(request.POST.get("topic_list", '[]'))
pictorial_tag_ids = json.loads(request.POST.get("tag_ids", '[]'))
if not user_id: if not user_id:
return self.parameter_invalid_response() return self.parameter_invalid_response()
...@@ -66,6 +67,7 @@ class CreateTopicForBatch(BaseView): ...@@ -66,6 +67,7 @@ class CreateTopicForBatch(BaseView):
item["card_level"] = card_level item["card_level"] = card_level
item["tag_id"] = tag_id if tag_id else None item["tag_id"] = tag_id if tag_id else None
item["is_online"] = is_online item["is_online"] = is_online
item["pictorial_tag_ids"] = pictorial_tag_ids
if item.get("location") and item.get("location").get("name"): if item.get("location") and item.get("location").get("name"):
_tag_error, _location_tag_data = self.call_rpc( _tag_error, _location_tag_data = self.call_rpc(
"venus/community/tag/batch_create_tag_by_name", "venus/community/tag/batch_create_tag_by_name",
...@@ -197,12 +199,11 @@ class CreateTopicForBatchByOne(BaseView): ...@@ -197,12 +199,11 @@ class CreateTopicForBatchByOne(BaseView):
# check_info = Sensitive.check(tag_names) # check_info = Sensitive.check(tag_names)
# tags = [tag_name for tag_name, succ in check_info.items() if not succ] # tags = [tag_name for tag_name, succ in check_info.items() if not succ]
# check_info = Sensitive.check(tag_names) # check_info = Sensitive.check(tag_names)
tags = [{"name": item} for item in tag_names]
# 先创建标签 # 先创建标签
_tag_error, _tag_data = self.call_rpc( _tag_error, _tag_data = self.call_rpc(
"venus/community/tag/batch_create_tag_by_name", "venus/community/tag/batch_create_tag_by_name",
tags=tags tags=tag_names
) )
if _tag_error: if _tag_error:
return self.error(_tag_error) return self.error(_tag_error)
......
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