Update nesting level to depth 2 when returning lots not UiTree

This commit is contained in:
yiorgos marinellis 2020-04-29 20:41:32 +02:00
parent 2851d4112f
commit e021702e0c

View file

@ -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)