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])
|
balancer.apply_transactions([t for t in transactions if t.dt <= assertion.dt])
|
||||||
|
|
||||||
# TODO: Commodities
|
# 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
|
assertion_status[assertion] = True
|
||||||
else:
|
else:
|
||||||
assertion_status[assertion] = False
|
assertion_status[assertion] = False
|
||||||
|
Loading…
Reference in New Issue
Block a user