From ec496c42b534d0c3373518c3d40992a05a6bd1ef Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 24 Jun 2026 20:37:30 +0530 Subject: [PATCH] refactor: parse native JSON request args in accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py Use frappe.parse_json instead of json.loads so the whitelisted endpoints accept native JSON types (list/dict/bool) in addition to JSON strings. --- .../bank_reconciliation_tool/bank_reconciliation_tool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py index d9aab98a98f..e84136a04c8 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -1058,9 +1058,9 @@ def get_auto_reconcile_message(partially_reconciled, reconciled): @frappe.whitelist() -def reconcile_vouchers(bank_transaction_name: str | int, vouchers: str, is_new_voucher: bool = False): +def reconcile_vouchers(bank_transaction_name: str | int, vouchers: str | list, is_new_voucher: bool = False): # updated clear date of all the vouchers based on the bank transaction - vouchers = json.loads(vouchers) + vouchers = frappe.parse_json(vouchers) transaction = frappe.get_doc("Bank Transaction", bank_transaction_name) transaction.add_payment_entries(vouchers, is_new_voucher) transaction.validate_duplicate_references()