From e66716710a95c6e917f132d0ee06b8d25b3ecc50 Mon Sep 17 00:00:00 2001 From: tanshu Date: Sat, 24 Apr 2021 00:05:06 +0530 Subject: [PATCH] Fix: Checking for product reductions would check the product version id and not the product id resulting in wrong error message that the quantitity cannot be reduced. --- barker/barker/routers/voucher/update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/barker/barker/routers/voucher/update.py b/barker/barker/routers/voucher/update.py index 8e15ea7..a39a086 100644 --- a/barker/barker/routers/voucher/update.py +++ b/barker/barker/routers/voucher/update.py @@ -137,7 +137,7 @@ def update_route( inv.quantity for ko in item.kots for inv in ko.inventories - if ko.id and inv.product_id == product.id + if ko.id and inv.product_id == product.product_id ) * -1, 2,