order_mode: Only send cancels for dialogs that still exist
parent
08e8990fe3
commit
d94ab9d5b2
|
@ -641,13 +641,13 @@ 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}',
|
||||||
group_key=key,
|
group_key=key,
|
||||||
)
|
)
|
||||||
dialog.last_status_close = cancel_status_close
|
dialog.last_status_close = cancel_status_close
|
||||||
|
|
||||||
def cancel_all_orders(self) -> None:
|
def cancel_all_orders(self) -> None:
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in New Issue