mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-24 12:36:37 +00:00
refactor: parse native JSON request args in stock/doctype/stock_entry/services/manufacturing.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:
@@ -1040,8 +1040,7 @@ def ceil_qty_if_uom_has_whole_number(qty, stock_uom):
|
||||
|
||||
@frappe.whitelist()
|
||||
def move_sample_to_retention_warehouse(company: str, items: str | list):
|
||||
if isinstance(items, str):
|
||||
items = json.loads(items)
|
||||
items = frappe.parse_json(items)
|
||||
|
||||
retention_warehouse = frappe.get_single_value("Stock Settings", "sample_retention_warehouse")
|
||||
stock_entry = frappe.new_doc("Stock Entry")
|
||||
|
||||
Reference in New Issue
Block a user