Commit 64007da9 authored by yangchenglin's avatar yangchenglin

fix

parent 6328161d
...@@ -51,7 +51,7 @@ class PictorialUpdateOrCreate(APIView): ...@@ -51,7 +51,7 @@ class PictorialUpdateOrCreate(APIView):
star_ids = json.loads(request.POST.get('star', '[]')) star_ids = json.loads(request.POST.get('star', '[]'))
pictorial_user_ids = json.loads(request.POST.get('pictorial_user_ids', '[]')) pictorial_user_ids = json.loads(request.POST.get('pictorial_user_ids', '[]'))
collection_tag_ids = json.loads(request.POST.get('collection_tag_ids', '[]')) collection_tag_ids = json.loads(request.POST.get('collection_tag_ids', '[]'))
pictorial_activity_id = request.POST.get('pictorial_activity_id', 0) pictorial_activity_id = request.POST.get('pictorial_activity_id')
data = { data = {
'name': request.POST.get('name', ''), 'name': request.POST.get('name', ''),
'description': request.POST.get('description', ''), 'description': request.POST.get('description', ''),
...@@ -66,7 +66,7 @@ class PictorialUpdateOrCreate(APIView): ...@@ -66,7 +66,7 @@ class PictorialUpdateOrCreate(APIView):
'add_score': int(request.POST.get('add_score', 0)), 'add_score': int(request.POST.get('add_score', 0)),
'is_public': True if request.POST.get('is_public') == "true" else False, 'is_public': True if request.POST.get('is_public') == "true" else False,
'is_feed': int(request.POST.get('is_feed', 0)), 'is_feed': int(request.POST.get('is_feed', 0)),
'pictorial_activity_ids': [int(pictorial_activity_id)], 'pictorial_activity_ids': [int(pictorial_activity_id)] if pictorial_activity_id else [],
'alias': request.POST.get('alias', ''), 'alias': request.POST.get('alias', ''),
} }
......
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