fix: Plaid TypeError in add_bank_accounts (#20335)

This commit is contained in:
Nabin Hait
2020-01-17 15:57:48 +05:30
committed by GitHub
parent f5374c182e
commit 444156184c

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 = []