diff --git a/rattail/batch/custorder.py b/rattail/batch/custorder.py index 0f059eeb658bc3489186ae4860cba4c9a6e02c4b..9b1eead56554de72bb91a1baad70558e43f1b0ba 100644 --- a/rattail/batch/custorder.py +++ b/rattail/batch/custorder.py @@ -355,6 +355,10 @@ class CustomerOrderBatchHandler(BatchHandler): # oh, and sort by something useful query = query.order_by(model.Customer.name) + # and finally, limit the number of results to something a + # browser is likely to be able to handle easily! + query = query[:100] # TODO: make configurable? + # generate result list from query results = [] for customer in query: @@ -401,6 +405,10 @@ class CustomerOrderBatchHandler(BatchHandler): # oh, and sort by something useful query = query.order_by(model.Person.display_name) + # and finally, limit the number of results to something a + # browser is likely to be able to handle easily! + query = query[:100] # TODO: make configurable? + # generate result list from query results = [] for person in query: