order_mode: Only send cancels for dialogs that still exist

account_tests
Tyler Goodlet 2023-07-26 15:43:48 -04:00
parent 08e8990fe3
commit d94ab9d5b2
1 changed files with 7 additions and 7 deletions

View File

@ -641,7 +641,7 @@ class OrderMode:
group_key=True group_key=True
) )
for oid in oids: for oid in oids:
dialog: Dialog = self.dialogs[oid] if dialog := self.dialogs.get(oid):
self.client.cancel_nowait(uuid=oid) self.client.cancel_nowait(uuid=oid)
cancel_status_close = self.multistatus.open_status( cancel_status_close = self.multistatus.open_status(
f'cancelling order {oid}', f'cancelling order {oid}',