From 9506a9d62a919c1ce8f37499843ead3085f15d6e Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 24 Jun 2026 20:37:35 +0530 Subject: [PATCH] refactor: parse native JSON request args in stock/doctype/stock_entry/stock_entry.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/stock/doctype/stock_entry/stock_entry.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 0ccd3a747b4..ab0496ac908 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1683,8 +1683,7 @@ def get_uom_details(item_code: str, uom: str, qty: float | None): @frappe.whitelist() def get_warehouse_details(args: str | dict): - if isinstance(args, str): - args = json.loads(args) + args = frappe.parse_json(args) args = frappe._dict(args)