Implement overriding owner name with requisition field
This commit is contained in:
@@ -22,6 +22,12 @@ class AggregatorClient(ABC):
|
||||
for bank, accounts in account_infos.items():
|
||||
# Iterate the accounts
|
||||
for index, account in enumerate(list(accounts)):
|
||||
if account["ownerName"] is None:
|
||||
requisition = self.instance.get_requisition(
|
||||
account["requisition_id"]
|
||||
)
|
||||
if requisition is not None:
|
||||
account["ownerName"] = requisition.owner_name
|
||||
if "account_number" not in account:
|
||||
account_infos[bank][index]["account_number"] = {}
|
||||
fields = ["sort_code", "number", "iban"]
|
||||
|
||||
Reference in New Issue
Block a user