diff --git a/tailbone/views/purchasing/ordering.py b/tailbone/views/purchasing/ordering.py index e184fd3f..69e361ed 100644 --- a/tailbone/views/purchasing/ordering.py +++ b/tailbone/views/purchasing/ordering.py @@ -428,8 +428,11 @@ class OrderingBatchView(PurchasingBatchView): self.handler.add_row(batch, row) # update row quantities - self.handler.update_row_quantity(row, cases_ordered=cases_ordered, - units_ordered=units_ordered) + try: + self.handler.update_row_quantity(row, cases_ordered=cases_ordered, + units_ordered=units_ordered) + except Exception as error: + return {'error': six.text_type(error)} else: # empty order quantities