Skip to content

Commit 07ab853

Browse files
committed
Order.symbol is a str..
1 parent 414866f commit 07ab853

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

piker/ui/order_mode.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class Dialog(Struct):
8888
# TODO: use ``pydantic.UUID4`` field
8989
uuid: str
9090
order: Order
91-
symbol: Symbol
91+
symbol: str
9292
lines: list[LevelLine]
9393
last_status_close: Callable = lambda: None
9494
msgs: dict[str, dict] = {}
@@ -379,7 +379,7 @@ def submit_order(
379379
dialog = Dialog(
380380
uuid=order.oid,
381381
order=order,
382-
symbol=order.symbol,
382+
symbol=order.symbol, # XXX: always a str?
383383
lines=lines,
384384
last_status_close=self.multistatus.open_status(
385385
f'submitting {order.exec_mode}-{order.action}',
@@ -964,8 +964,9 @@ async def process_trade_msg(
964964
oid = msg.oid
965965
dialog: Dialog = mode.dialogs.get(oid)
966966

967-
fqsn = dialog.symbol.front_fqsn()
968-
flume = mode.feed.flumes[fqsn]
967+
if dialog:
968+
fqsn = dialog.symbol
969+
flume = mode.feed.flumes[fqsn]
969970

970971
match msg:
971972
case Status(

0 commit comments

Comments
 (0)