austax: Fail gracefully when PAGYW account does not exist

This commit is contained in:
RunasSudo 2023-05-28 13:04:40 +10:00
parent a3ef647a2d
commit 4bdb31c35e
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ def make_tax_transactions():
# PAYG withholding
for account_name, kinds in account_configurations.items():
if 'austax.paygw' in kinds:
if accounts[account_name].quantity != 0:
if account_name in accounts and accounts[account_name].quantity != 0:
# Transfer balance to Income Tax Control
transactions.append(Transaction(
dt=dt,