Commit 13f36757 authored by 王浩's avatar 王浩

Merge branch 'haow/new' into 'master'

alpha 1.6 临时上线

See merge request alpha/sun!168
parents a6c2dcb9 d3c83e0c
......@@ -54,15 +54,15 @@ class TagUpdateOrCreateView(APIView):
tagtypes = list(set(map(lambda x: x.split(":")[0], json.loads((request.POST.get('tagtypes', '[]'))))))
data = {
'name': request.POST.get('name').lower(),
'description': request.POST.get('description'),
'description': request.POST.get('description', ''),
'down_tags': down_tags,
'up_tags': up_tags,
'tagtypes': tagtypes,
'icon_url': request.POST.get('icon_url', '')[:-2],
'platform': request.POST.get('platform'),
'collection': request.POST.get('collection'),
'alias': request.POST.get('alias'),
'is_show_in_register': request.POST.get('is_show_in_register')
'platform': request.POST.get('platform', 1),
'collection': request.POST.get('collection', 0),
'alias': request.POST.get('alias', ''),
'is_show_in_register': request.POST.get('is_show_in_register', 'false')
}
try:
data = self.rpc['venus/sun/tag/edit'](id=id, data=data).unwrap()
......
......@@ -129,6 +129,8 @@ class TopicUpdateOrCreateView(APIView):
'drop_score': int(request.POST.get('drop_score')),
'has_image': 1 if topic_images else 0,
'has_video': 1 if request.POST.get('video_url', '') else 0,
'virtual_vote_num': request.POST.get('virtual_vote_num', ''),
}
try:
self.rpc['venus/sun/topic/edit'](id=id, data=data).unwrap()
......
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