Don't print a warning until the account is unusable

This commit is contained in:
Mark Veidemanis 2022-05-09 08:24:04 +01:00
parent 648cd642c1
commit 4089318343
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 1 additions and 1 deletions

View File

@ -293,12 +293,12 @@ class Nordigen(util.Base):
sort_code = parsed["bban"][0:6]
account_number = parsed["bban"][6:]
if "ownerName" not in parsed:
self.log.warning(f"No owner name in parsed, cannot use: {account_id}")
ownernames = self.get_ownernames()
if account_id in ownernames:
parsed["ownerName"] = ownernames[account_id]
self.log.info(f"Found supplementary owner name for {account_id}: {ownernames[account_id]}")
else:
self.log.error(f"No owner name in parsed, cannot use: {account_id}")
return False
recipient = parsed["ownerName"]
del parsed["bban"]