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

Merge branch 'haow/dev' into 'test'

fix tag create

See merge request alpha/sun!167
parents 9fa02039 bd07d37f
......@@ -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()
......
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