Commit 5a62544c authored by yangchenglin's avatar yangchenglin

fix

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