From d73ff0a2bfb23179b00b48ea86ce0feba46817a2 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 24 Jul 2026 17:33:58 +0530 Subject: [PATCH] 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. --- erpnext/accounts/services/child_item_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/services/child_item_update.py b/erpnext/accounts/services/child_item_update.py index 99b6b186116..61528e42e28 100644 --- a/erpnext/accounts/services/child_item_update.py +++ b/erpnext/accounts/services/child_item_update.py @@ -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)