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:
Nabin Hait
2026-07-24 17:33:58 +05:30
parent 7b93252621
commit d73ff0a2bf

View File

@@ -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)