Commit 35d18022 authored by 王浩's avatar 王浩

fix code

parent 42f3d7ae
......@@ -40,7 +40,7 @@ class PictorialUpdateOrCreate(APIView):
try:
data = self.rpc['venus/sun/pictorial/get'](id=id).unwrap()
except Exception as e:
error_logger.error(u'获取%s用户信息失败%s'%(id, e))
error_logger.error(u'获取%s画报信息失败%s'%(id, e))
raise
return data
......
......@@ -112,6 +112,7 @@ class TopicUpdateOrCreateView(APIView):
topic_images = list(map(lambda x: x[:-2], json.loads(request.POST.get('topic_images', []))))
tag_ids = list(map(lambda x: x.split(':')[0], json.loads(request.POST.get('tags', '[]'))))
collection_tag_ids = list(map(lambda x: x.split(':')[0], json.loads(request.POST.get('collection_tags', '[]'))))
pictorial_ids = list(json.loads(request.POST.get('pictorial_ids', '[]')))
data = {
'topic_images': topic_images,
......@@ -119,7 +120,7 @@ class TopicUpdateOrCreateView(APIView):
'posting_time': request.POST.get('posting_time'),
'content': request.POST.get('content', ''),
'content_level': request.POST.get('content_level', ''),
'pictorial_id': request.POST.get('pictorial', '').split(':')[0],
'pictorial_ids': pictorial_ids,
'user_id': request.POST.get('user', '').split(':')[0],
'star_id': request.POST.get('star', '').split(':')[0],
'tag_ids': tag_ids,
......
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