Commit 7face98e authored by haowang's avatar haowang

fix code

parent 7fd8ac80
......@@ -34,6 +34,7 @@ class CreatePictorial(BaseView):
def get_user_id(self, id_, platform):
cache_key = 'grap:{}:{}'.format(platform, id_)
exist_key = 'grap:{}:{}'
# print(cache_key)
value = ins_cache.get(cache_key)
user_id = None
if not value:
......@@ -86,11 +87,10 @@ class CreatePictorial(BaseView):
obj['from_id'] = from_id
obj['content'] = obj.get('comment')
reply = obj.pop('reply', None)
ret.append(obj)
if not reply:
ret.append(obj)
continue
for info in reply:
ret.append(obj)
info['from_id'] = obj.get('from_id')
info['reply_id'] = obj.get('id')
info['type'] = obj.get('type')
......
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