Handle empty transactions response
This commit is contained in:
parent
e53721da8c
commit
9cc655a6a1
|
@ -355,7 +355,11 @@ class Nordigen(util.Base):
|
||||||
except ValidationError as err:
|
except ValidationError as err:
|
||||||
self.log.error(f"Validation error: {err}")
|
self.log.error(f"Validation error: {err}")
|
||||||
return
|
return
|
||||||
parsed = obj.to_dict()["transactions"]["booked"]
|
parsed_obj = obj.to_dict()
|
||||||
|
if "transactions" not in parsed_obj:
|
||||||
|
self.log.warning(f"No transactions for account: {account_id}")
|
||||||
|
return {}
|
||||||
|
parsed = parsed_obj["transactions"]["booked"]
|
||||||
self.normalise_transactions(parsed)
|
self.normalise_transactions(parsed)
|
||||||
return parsed
|
return parsed
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue