Fail gracefully checking balance assertions when account does not exist
This commit is contained in:
parent
6c2d96e300
commit
a8ec41b2f2
@ -136,7 +136,7 @@ def balance_assertions():
|
||||
balancer.apply_transactions([t for t in transactions if t.dt <= assertion.dt])
|
||||
|
||||
# TODO: Commodities
|
||||
if balancer.accounts[assertion.account].quantity == assertion.quantity:
|
||||
if assertion.account in balancer.accounts and balancer.accounts[assertion.account].quantity == assertion.quantity:
|
||||
assertion_status[assertion] = True
|
||||
else:
|
||||
assertion_status[assertion] = False
|
||||
|
Loading…
Reference in New Issue
Block a user