refactor: drop dead except TypeError in add_bank_accounts

frappe.parse_json never raises TypeError (unlike json.loads on a non-str),
so the try/except guarding the parse is now unreachable.
This commit is contained in:
Mihir Kandoi
2026-06-24 20:55:01 +05:30
parent 6a4afd1733
commit 71b4cc4f12

View File

@@ -80,11 +80,7 @@ def add_institution(token: str, response: str | dict):
@frappe.whitelist()
def add_bank_accounts(response: str | dict, bank: str | dict, company: str):
try:
response = frappe.parse_json(response)
except TypeError:
pass
response = frappe.parse_json(response)
bank = frappe.parse_json(bank)
result = []