Commit eef6be89 authored by 杨成林's avatar 杨成林

Merge branch 'ycl/fix' into 'test'

fix tag create

See merge request !51
parents 6c5c085c 5cf9c369
...@@ -112,7 +112,9 @@ class CreateTopicForBatch(BaseView): ...@@ -112,7 +112,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)
# 更新发帖 # 更新发帖
# 处理标签,将文本中的标签处理成现有标签 # 处理标签,将文本中的标签处理成现有标签
...@@ -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