ib: pack empty `dict` on no flow entry
parent
c3f8b089be
commit
9005335e18
|
@ -1249,7 +1249,7 @@ async def deliver_trade_events(
|
||||||
if err['reqid'] == -1:
|
if err['reqid'] == -1:
|
||||||
log.error(f'TWS external order error:\n{pformat(err)}')
|
log.error(f'TWS external order error:\n{pformat(err)}')
|
||||||
|
|
||||||
flow: ChainMap = flows.get(reqid)
|
flow: dict = dict(flows.get(reqid)) or {}
|
||||||
|
|
||||||
# TODO: we don't want to relay data feed / lookup errors
|
# TODO: we don't want to relay data feed / lookup errors
|
||||||
# so we need some further filtering logic here..
|
# so we need some further filtering logic here..
|
||||||
|
@ -1260,7 +1260,7 @@ async def deliver_trade_events(
|
||||||
reason=reason,
|
reason=reason,
|
||||||
broker_details={
|
broker_details={
|
||||||
'name': 'ib',
|
'name': 'ib',
|
||||||
'flow': dict(flow),
|
'flow': flow,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
flows.add_msg(reqid, err_msg.to_dict())
|
flows.add_msg(reqid, err_msg.to_dict())
|
||||||
|
|
Loading…
Reference in New Issue