Commit df6f0769 authored by haowang's avatar haowang

fix code

parent 30f59f65
......@@ -10,13 +10,12 @@ class PictorialListView(APIView):
offset = int(request.GET.get('page', 1))
limit = int(request.GET.get('limit', 10))
filters = self.handle_filter(request.GET.get('filter', '{}'))
product_id = request.GET.get('product_id')
if star_id:
filters.update({'star_id': star_id})
if user_id:
filters.update({'user_id': user_id})
try:
data = self.rpc['venus/sun/pictorial/list'](filters=filters, offset=(offset-1)*limit, limit=limit, product_id=product_id).unwrap()
data = self.rpc['venus/sun/pictorial/list'](filters=filters, offset=(offset-1)*limit, limit=limit).unwrap()
except Exception as e:
error_logger.error(u'获取画报列表失败%s' , e)
raise
......
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