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

Merge branch 'ycl/fix_pictorial' into 'test'

fix

See merge request alpha/sun!351
parents 566011b1 5a62544c
......@@ -203,8 +203,9 @@ class PictorialFollowsDel(APIView):
"""删除榜单中的关注者"""
def post(self, request):
pictorial_id = request.POST.get('pictorial_id')
pictorial_id = int(request.POST.get('pictorial_id', 0))
user_ids = json.loads(request.POST.get('user_ids', '[]'))
user_ids = [int(item) for item in user_ids]
try:
self.rpc['venus/sun/pictorial/follows/del'](pictorial_id=pictorial_id, user_ids=user_ids).unwrap()
except Exception as e:
......@@ -219,8 +220,9 @@ class PictorialFollowsAdd(APIView):
"""新增榜单中的关注者"""
def post(self, request):
pictorial_id = request.POST.get('pictorial_id')
pictorial_id = int(request.POST.get('pictorial_id', 0))
user_ids = json.loads(request.POST.get('user_ids', '[]'))
user_ids = [int(item) for item in user_ids]
try:
self.rpc['venus/sun/pictorial/follows/add'](pictorial_id=pictorial_id, user_ids=user_ids).unwrap()
except Exception as e:
......
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