From fe8be87200d8f68f723f7bbb2ec00ca93ad42d0d Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 24 Jun 2026 20:37:31 +0530 Subject: [PATCH] refactor: parse native JSON request args in accounts/doctype/unreconcile_payment/unreconcile_payment.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. --- .../doctype/unreconcile_payment/unreconcile_payment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py b/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py index be4b1674241..97a17c21600 100644 --- a/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py +++ b/erpnext/accounts/doctype/unreconcile_payment/unreconcile_payment.py @@ -201,9 +201,9 @@ def get_linked_advances(company, docname): @frappe.whitelist() -def create_unreconcile_doc_for_selection(selections: str | None = None): +def create_unreconcile_doc_for_selection(selections: str | list | None = None): if selections: - selections = json.loads(selections) + selections = frappe.parse_json(selections) # assuming each row is a unique voucher for row in selections: unrecon = frappe.new_doc("Unreconcile Payment")