Commit fd8fd189 authored by 王浩's avatar 王浩

Merge branch 'haow/pin_crawl' into 'master'

fix pictorial name

See merge request alpha/saturn!73
parents 6e07d665 7687428c
...@@ -121,6 +121,8 @@ class CreateTopicForBatch(BaseView): ...@@ -121,6 +121,8 @@ 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_name = request.POST.get('pictorial_name', '')
# pictorial_alias = request.POST.get('pictorial_alias', '')
pictorial_tag_ids = json.loads(request.POST.get("tag_ids", '[]')) pictorial_tag_ids = json.loads(request.POST.get("tag_ids", '[]'))
is_app = request.POST.get('is_app', None) is_app = request.POST.get('is_app', None)
...@@ -174,7 +176,6 @@ class CreateTopicForBatch(BaseView): ...@@ -174,7 +176,6 @@ 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.batch_create_tags(tags=[item.get("location").get("name")], is_location=1, is_own=1) _tag_error, _location_tag_data = self.batch_create_tags(tags=[item.get("location").get("name")], is_location=1, is_own=1)
if _location_tag_data: if _location_tag_data:
...@@ -205,9 +206,12 @@ class CreateTopicForBatch(BaseView): ...@@ -205,9 +206,12 @@ class CreateTopicForBatch(BaseView):
'api': 'venus/community/topic/batch_create_for_inner', 'api': 'venus/community/topic/batch_create_for_inner',
'topic_list': topic_list, 'topic_list': topic_list,
}) })
pictorial_name = topics[0].get('pictorial_name', '')
pictorial_alias = topics[0].get('pictorial_alias', '')
create_err, result = self.call_rpc( create_err, result = self.call_rpc(
"venus/community/topic/batch_create_for_inner", "venus/community/topic/batch_create_for_inner",
topic_list=topic_list topic_list=topic_list, pictorial_tag_ids=pictorial_tag_ids, pictorial_name=pictorial_name, pictorial_alias=pictorial_alias,
) )
if create_err: if create_err:
return self.error(create_err) return self.error(create_err)
......
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