Skip to content

Commit

Permalink
fix(truelayer): Skip unsupported account types
Browse files Browse the repository at this point in the history
Some providers (e.g. barclaycard) do not support both "accounts" and
"cards". If the truelayer importer comes across such a provider, it will
fail to fetch the unsupported account type, and omit that from the
config

If the key is omitted from the config, we'll try to read from an invalid
key when we later look for all transactions
  • Loading branch information
Minion3665 committed Jul 18, 2024
1 parent b2905ec commit b14d040
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autobean/truelayer/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ def _fetch_balances(
def _fetch_all_transactions(self) -> list[Directive]:
entries: list[Directive] = []
for type_ in ACCOUNT_TYPES:
if not type_ in self._config.data:
continue

for account_id, account in self._config.data[type_].items():
if not account['enabled']:
continue
Expand Down

0 comments on commit b14d040

Please sign in to comment.