mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-24 20:46:38 +00:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user