Commit a2016ea3 authored by zhongshangwu's avatar zhongshangwu

完善用户编辑专家领域标签

parent fd04ea4c
......@@ -66,6 +66,13 @@ class UserUpdateOrCreate(APIView):
body_esthetics_tag_ids = list(
map(lambda x: x.split(':')[0], json.loads(request.POST.get('body_esthetics_tags', '[]'))))
expert_tags = json.loads(request.POST.get('expert_tags', '[]'))
try:
expert_tag_ids = [[int(item[0].split(":")[0]), int(item[1])] for item in expert_tags]
except:
error_logger.error(u'创建/编辑%s用户详情失败%s' % (id, e))
raise
data = {
'user_id': user_id,
'password': password,
......@@ -80,6 +87,7 @@ class UserUpdateOrCreate(APIView):
'gender': request.POST.get('gender'),
'is_tcc': int(request.POST.get('is_tcc', 0)),
'body_esthetics_tag_ids': body_esthetics_tag_ids,
'expert_tag_ids': expert_tag_ids,
'is_kol': int(request.POST.get('is_kol', 0)),
}
......
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