We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ceaa53 commit 9dc1621Copy full SHA for 9dc1621
python-service/app/app/main.py
@@ -145,8 +145,11 @@ def get(self):
145
page = request.args.get("page", 0)
146
size = request.args.get("size", 10)
147
log.debug(f'Get all products - page: {page}\t size: {size}')
148
- # products = Product.objects().to_json()
149
- products = Product.objects.paginate(page=page, per_page=size).to_json()
+ try:
+ products = Product.objects.paginate(page=page, per_page=size, error_out=False).to_json()
150
+ except Exception as e:
151
+ log.warn('Did not work pagination', exc_info=e)
152
+ products = Product.objects().to_json()
153
return Response(products, mimetype="application/json", status=200)
154
155
"""Create new product"""
0 commit comments