Add extra error handling in Nordigen balances
This commit is contained in:
parent
5b596ae4b5
commit
933642def6
|
@ -450,6 +450,9 @@ class Nordigen(util.Base):
|
||||||
parsed = obj.to_dict()
|
parsed = obj.to_dict()
|
||||||
total = 0
|
total = 0
|
||||||
currency = None
|
currency = None
|
||||||
|
if "balances" not in parsed:
|
||||||
|
self.log.error(f"No balances: {parsed}")
|
||||||
|
return (False, False)
|
||||||
for entry in parsed["balances"]:
|
for entry in parsed["balances"]:
|
||||||
if currency:
|
if currency:
|
||||||
if not currency == entry["balanceAmount"]["currency"]:
|
if not currency == entry["balanceAmount"]["currency"]:
|
||||||
|
|
Loading…
Reference in New Issue