fix!: Enqueue action after commit

This commit is contained in:
Ankush Menat 2024-03-11 13:11:21 +05:30
parent bf449e8207
commit 68a78d33d3

View file

@ -1536,11 +1536,16 @@ class Document(BaseDocument):
primary_action=primary_action,
)
enqueue_after_commit = kwargs.pop("enqueue_after_commit", None)
if enqueue_after_commit is None:
enqueue_after_commit = True
return enqueue(
"frappe.model.document.execute_action",
__doctype=self.doctype,
__name=self.name,
__action=action,
enqueue_after_commit=enqueue_after_commit,
**kwargs,
)