diff --git a/tailbone/views/batch/inventory.py b/tailbone/views/batch/inventory.py index 30412eb9..91577277 100644 --- a/tailbone/views/batch/inventory.py +++ b/tailbone/views/batch/inventory.py @@ -371,17 +371,9 @@ class InventoryBatchView(BatchMasterView): return result + # TODO: deprecate / remove def find_row_for_product(self, batch, product): - rows = self.Session.query(model.InventoryBatchRow)\ - .filter(model.InventoryBatchRow.batch == batch)\ - .filter(model.InventoryBatchRow.product == product)\ - .filter(model.InventoryBatchRow.removed == False)\ - .all() - if rows: - if len(rows) > 1: - log.error("inventory batch %s should aggregate products, but has %s rows for: %s", - batch.id_str, len(rows), product) - return rows[0] + return self.handler.find_row_for_product(self.Session(), batch, product) def find_product(self, entry): upc = re.sub(r'\D', '', entry.strip())