Commit 26de98af authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'test'

fix code

See merge request !127
parents 483f496f 9890791a
......@@ -46,7 +46,7 @@ class UpdateOrCreateView(APIView):
def post(self, request):
id = request.POST.get('id', '')
pick_group_ids = list(set(map(lambda x: x.split(":")[0], json.loads(request.POST.get('pick_group', '[]')))))
pick_pictorial_ids = list(set(map(lambda x: x.split(":")[0], json.loads(request.POST.get('pick_pictorial', '[]')))))
country_ids = list(set(map(lambda x: x.split(':')[0], json.loads(request.POST.get('country', '[]')))))
position = request.POST.get('position')
gender = request.POST.get('gender')
......@@ -79,7 +79,7 @@ class UpdateOrCreateView(APIView):
'gender': data_dict['gender'] if id else gender,
'country_ids': country_ids,
'pick_type': data_dict['pick_type'] if id else pick_type,
'pick_group': pick_group_ids,
'pick_pictorial': pick_pictorial_ids,
'is_online': int(request.POST.get('is_online')),
}
if position:
......
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