refactor: parse native JSON request args in accounts/services/child_item_update.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:31 +05:30
parent fe8be87200
commit 0e862d61d1

View File

@@ -30,7 +30,7 @@ class ChildItemUpdater:
self._ordered_items: dict | None = None
self._purchased_items: dict | None = None
def update(self, trans_items: str) -> None:
def update(self, trans_items: str | list) -> None:
"""Process item additions, edits, and deletions from trans_items JSON."""
from erpnext.buying.doctype.supplier_quotation.supplier_quotation import get_purchased_items
from erpnext.selling.doctype.quotation.mapper import get_ordered_items