fix: return updated doc from execute_doc_method
This commit is contained in:
parent
e089b2d723
commit
79893f0248
1 changed files with 4 additions and 1 deletions
|
|
@ -170,7 +170,10 @@ def execute_doc_method(doctype: str, name: str, method: str | None = None):
|
|||
doc.is_whitelisted(method)
|
||||
|
||||
doc.check_permission(PERMISSION_MAP[frappe.request.method])
|
||||
return doc.run_method(method, **frappe.form_dict)
|
||||
result = doc.run_method(method, **frappe.form_dict)
|
||||
doc.reload()
|
||||
frappe.response.docs.append(doc.as_dict())
|
||||
return result
|
||||
|
||||
|
||||
def run_doc_method(method: str, document: dict[str, Any] | str, kwargs=None):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue