Commit 4da8995e authored by haowang's avatar haowang

fix code

parent 9192e464
......@@ -109,7 +109,9 @@ class CreatePictorial(BaseView):
error, ret = self.call_rpc('venus/community/crawl/replys', data=[top_comment], platform=platform, topic_id=topic_id, pictorial_id=pictorial_id)
if error:
return error, ret
top_id = ret.get('reply_ids')[0]
top_id = 0
for obj in comments:
obj['user_id'] = self.get_user_id(id_=obj.get('user').get('id'), platform=platform)
......@@ -117,7 +119,8 @@ class CreatePictorial(BaseView):
error, _ = self.call_rpc('venus/community/crawl/replys', data=comments, platform=platform, topic_id=topic_id, pictorial_id=pictorial_id, top_id=top_id)
if error:
return error, _
return error, None
return None, None
def create_topic(self, topics, platform):
for topic in topics:
......@@ -172,7 +175,7 @@ class CreatePictorial(BaseView):
if topics:
for obj in topics:
error, id_ = self.call_rpc('venus/community/crawl/topic', data=obj, platform=platform, pictorial_id=pictorial_id)
error, _ = self.call_rpc('venus/community/crawl/topic', data=obj, platform=platform, pictorial_id=pictorial_id)
if error:
return error, None
if pictorial_comments:
......
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