From a869b748f1b38a1d808a632a68f6b27091c6aa52 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/account/chart_of_accounts/chart_of_accounts.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/account/chart_of_accounts/chart_of_accounts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py index 1ee409a290c..89530b56e81 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py @@ -137,7 +137,7 @@ def get_charts_for_country(country: str, with_standard: bool = False): def _get_chart_name(content): if content: - content = json.loads(content) + content = frappe.parse_json(content) if ( content and content.get("disabled", "No") == "No" ) or frappe.local.flags.allow_unverified_charts: