fix: Plaid TypeError in add_bank_accounts (#20336)

This commit is contained in:
Nabin Hait
2020-01-17 15:57:43 +05:30
committed by GitHub
parent d85e144944
commit 4b893b1d51

View File

@@ -53,7 +53,11 @@ def add_institution(token, response):
@frappe.whitelist()
def add_bank_accounts(response, bank, company):
response = json.loads(response) if not "accounts" in response else response
try:
response = json.loads(response)
except TypeError:
pass
bank = json.loads(bank)
result = []