Commit bd07d37f authored by 王浩's avatar 王浩

fix tag create

parent 9fa02039
......@@ -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