Commit 5cf9c369 authored by yangchenglin's avatar yangchenglin

fix tag create

parent 13a16f48
...@@ -110,7 +110,9 @@ class CreateTopicForBatch(BaseView): ...@@ -110,7 +110,9 @@ class CreateTopicForBatch(BaseView):
) )
if _tag_error: if _tag_error:
return self.error(_tag_error) return self.error(_tag_error)
_tag_data.update(location_tags)
for item in location_tags:
_tag_data.update(item)
# 更新发帖 # 更新发帖
# 处理标签,将文本中的标签处理成现有标签 # 处理标签,将文本中的标签处理成现有标签
...@@ -195,12 +197,11 @@ class CreateTopicForBatchByOne(BaseView): ...@@ -195,12 +197,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