Commit e183af11 authored by 杨成林's avatar 杨成林

Merge branch 'ycl/pictorial_activity' into 'test'

Ycl/pictorial activity

See merge request alpha/sun!248
parents d3a9fd76 c02c9f58
......@@ -52,6 +52,7 @@ class TagUpdateOrCreateView(APIView):
down_tags = list(set(map(lambda x: x.split(":")[0], json.loads((request.POST.get('down_tags', '[]'))))))
up_tags = list(set(map(lambda x: x.split(":")[0], json.loads((request.POST.get('up_tags', '[]'))))))
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', ''),
......@@ -62,7 +63,9 @@ class TagUpdateOrCreateView(APIView):
'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')
'is_show_in_register': request.POST.get('is_show_in_register', 'false'),
'pictorial_ids': list(
(map(lambda x: int(x.split(":")[0]), json.loads((request.POST.get('pictorials', '[]'))))))
}
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