fixing revoke

This commit is contained in:
Cayo Puigdefabregas 2021-06-07 11:48:50 +02:00
parent 21cdcb5350
commit 289126a8a7
1 changed files with 3 additions and 1 deletions

View File

@ -285,7 +285,9 @@ def delete_from_trade(lot: Lot, ids: Set[int]):
for dev in devices:
# if have only one confirmation
# then can be revoked and deleted of the lot
if dev.trading == 'NeedConfirmation':
# Confirm of dev.trading mean that there are only one confirmation
# and the first user than put this device in trade is the actual g.user
if dev.trading == 'Confirm':
without_confirms.add(dev)
dev.reset_owner()