Skip to content

Commit

Permalink
Always ensure symcache mkt pair entry is valid type
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Sep 19, 2023
1 parent 30d55fd commit 05959ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions piker/accounting/_pos.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,11 @@ def update_from_ledger(

if not (pos := pps.get(bs_mktid)):

assert isinstance(
mkt,
MktPair,
)

# if no existing pos, allocate fresh one.
pos = pps[bs_mktid] = Position(
mkt=mkt,
Expand Down

0 comments on commit 05959ea

Please sign in to comment.