Commit 2ae7c724 authored by 钟尚武's avatar 钟尚武

Merge branch 'shangwu/feature-expoert-tag' into 'test'

fix

See merge request alpha/sun!354
parents 2b625887 dafbd47a
......@@ -60,7 +60,7 @@ class TagUpdateOrCreateView(APIView):
official_pictorial_id = official_pictorial_id[0]
else:
official_pictorial_id = None
is_expert = int(request.POST.get('is_expert', 0))
data = {
'name': request.POST.get('name').lower(),
'description': request.POST.get('description', ''),
......@@ -75,8 +75,8 @@ class TagUpdateOrCreateView(APIView):
'official_pictorial_id': official_pictorial_id,
'is_show_in_register': request.POST.get('is_show_in_register', 'false'),
'is_expert': request.POST.get('is_expert', 0),
'gray_badge': request.POST.get('gray_badge', ''),
'light_badge': request.POST.get('light_badge', ''),
'gray_badge': request.POST.get('gray_badge', '') if is_expert else "",
'light_badge': request.POST.get('light_badge', '') if is_expert else "",
'pictorial_ids': list(
(map(lambda x: int(x.split(":")[0]), json.loads((request.POST.get('pictorial_ids', '[]'))))))
}
......
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