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