mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-15 15:38:39 +00:00
refactor: parse native JSON request args in assets/doctype/asset_capitalization/asset_capitalization.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:
@@ -669,8 +669,7 @@ def get_service_item_details(ctx: ItemDetailsCtx) -> frappe._dict:
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_items_tagged_to_wip_composite_asset(params: dict | str):
|
||||
if isinstance(params, str):
|
||||
params = json.loads(params)
|
||||
params = frappe.parse_json(params)
|
||||
|
||||
fields = [
|
||||
"item_code",
|
||||
|
||||
Reference in New Issue
Block a user