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.
This commit is contained in:
Mihir Kandoi
2026-06-24 20:37:35 +05:30
parent 63a1b7d8e5
commit 9506a9d62a

View File

@@ -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)