mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-11 13:41:47 +00:00
fix: accept list payload for trans_items in update_child_qty_rate
The whitelisted endpoint declared trans_items as str, so Frappe's typing validation raised FrappeTypeError when the client sent the items as a JSON list. ChildItemUpdater.update already handles both via frappe.parse_json, so widen the wrapper's hint to str | list.
This commit is contained in:
@@ -314,7 +314,7 @@ class ChildItemUpdater:
|
||||
|
||||
@frappe.whitelist()
|
||||
def update_child_qty_rate(
|
||||
parent_doctype: str, trans_items: str, parent_doctype_name: str, child_docname: str = "items"
|
||||
parent_doctype: str, trans_items: str | list, parent_doctype_name: str, child_docname: str = "items"
|
||||
) -> None:
|
||||
ChildItemUpdater(parent_doctype, parent_doctype_name, child_docname).update(trans_items)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user