From cef22f01cee0014829bf5fb336049ad6e68b4f19 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 11 Nov 2021 17:23:45 +0100 Subject: [PATCH] fixing deletr_from_trade --- ereuse_devicehub/resources/lot/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/resources/lot/views.py b/ereuse_devicehub/resources/lot/views.py index 6ee86cdf..521696f0 100644 --- a/ereuse_devicehub/resources/lot/views.py +++ b/ereuse_devicehub/resources/lot/views.py @@ -269,12 +269,13 @@ def delete_from_trade(lot: Lot, devices: List): drop_of_lot = [] without_confirms = [] + # import pdb; pdb.set_trace() for dev in devices: if dev.trading_for_web(lot) in ['NeedConfirmation', 'Confirm', 'NeedConfirmRevoke']: drop_of_lot.append(dev) dev.reset_owner() - if lot.trade.confirm: + if not lot.trade.confirm: drop_of_lot.append(dev) without_confirms.append(dev) dev.reset_owner()