From 07ab853d3d03bb31c7c887318e6913c71d0e182c Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 25 Nov 2022 16:41:26 -0500 Subject: [PATCH] `Order.symbol` is a `str`.. --- piker/ui/order_mode.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/piker/ui/order_mode.py b/piker/ui/order_mode.py index c7b3cc59..1dd49872 100644 --- a/piker/ui/order_mode.py +++ b/piker/ui/order_mode.py @@ -88,7 +88,7 @@ class Dialog(Struct): # TODO: use ``pydantic.UUID4`` field uuid: str order: Order - symbol: Symbol + symbol: str lines: list[LevelLine] last_status_close: Callable = lambda: None msgs: dict[str, dict] = {} @@ -379,7 +379,7 @@ class OrderMode: dialog = Dialog( uuid=order.oid, order=order, - symbol=order.symbol, + symbol=order.symbol, # XXX: always a str? lines=lines, last_status_close=self.multistatus.open_status( f'submitting {order.exec_mode}-{order.action}', @@ -964,8 +964,9 @@ async def process_trade_msg( oid = msg.oid dialog: Dialog = mode.dialogs.get(oid) - fqsn = dialog.symbol.front_fqsn() - flume = mode.feed.flumes[fqsn] + if dialog: + fqsn = dialog.symbol + flume = mode.feed.flumes[fqsn] match msg: case Status(