Fix subtle bug when identifying purchase batch row on order form update

This commit is contained in:
Lance Edgar 2017-05-18 09:22:39 -05:00
parent d04f80e4e0
commit 9e0e21399b

View file

@ -695,7 +695,7 @@ class PurchaseBatchView(BatchMasterView):
return {'error': "Product not found"} return {'error': "Product not found"}
row = None row = None
rows = [row for row in batch.data_rows if row.product_uuid == uuid] rows = [r for r in batch.data_rows if r.product_uuid == uuid]
if rows: if rows:
assert len(rows) == 1 assert len(rows) == 1
row = rows[0] row = rows[0]