From e021702e0c6bdcd7e2eeac61cdece1fab786594e Mon Sep 17 00:00:00 2001 From: yiorgos marinellis Date: Wed, 29 Apr 2020 20:41:32 +0200 Subject: [PATCH] Update nesting level to depth 2 when returning lots not UiTree --- ereuse_devicehub/resources/lot/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/resources/lot/views.py b/ereuse_devicehub/resources/lot/views.py index b0741e32..97fcb064 100644 --- a/ereuse_devicehub/resources/lot/views.py +++ b/ereuse_devicehub/resources/lot/views.py @@ -93,7 +93,7 @@ class LotView(View): query = query.filter(Lot.name.ilike(args['search'] + '%')) lots = query.paginate(per_page=6 if args['search'] else 30) return things_response( - self.schema.dump(lots.items, many=True, nested=0), + self.schema.dump(lots.items, many=True, nested=2), lots.page, lots.per_page, lots.total, lots.prev_num, lots.next_num ) return jsonify(ret)