From 0ff4840dcb5f2afb0f4c1ff15f2fc78a3e59e646 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 24 Jun 2026 20:37:32 +0530 Subject: [PATCH] refactor: parse native JSON request args in controllers/taxes_and_totals.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. --- erpnext/controllers/taxes_and_totals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 11b7f8d9011..b598db625a4 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -342,7 +342,7 @@ class calculate_taxes_and_totals: self._set_in_company_currency(item, ["net_rate", "net_amount"]) def _load_item_tax_rate(self, item_tax_rate): - return json.loads(item_tax_rate) if item_tax_rate else {} + return frappe.parse_json(item_tax_rate) if item_tax_rate else {} def get_current_tax_fraction(self, tax, item_tax_map): """