diff --git a/austax/__init__.py b/austax/__init__.py index 5dfcd19..c38eab1 100644 --- a/austax/__init__.py +++ b/austax/__init__.py @@ -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,