mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-13 17:20:36 +00:00
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:
@@ -30,7 +30,7 @@ class ChildItemUpdater:
|
|||||||
self._ordered_items: dict | None = None
|
self._ordered_items: dict | None = None
|
||||||
self._purchased_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."""
|
"""Process item additions, edits, and deletions from trans_items JSON."""
|
||||||
from erpnext.buying.doctype.supplier_quotation.supplier_quotation import get_purchased_items
|
from erpnext.buying.doctype.supplier_quotation.supplier_quotation import get_purchased_items
|
||||||
from erpnext.selling.doctype.quotation.mapper import get_ordered_items
|
from erpnext.selling.doctype.quotation.mapper import get_ordered_items
|
||||||
|
|||||||
Reference in New Issue
Block a user