fixing deletr_from_trade

This commit is contained in:
Cayo Puigdefabregas 2021-11-11 17:23:45 +01:00
parent 54977d432d
commit cef22f01ce
1 changed files with 2 additions and 1 deletions

View File

@ -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()