Skip to content

Commit

Permalink
fix!: Enqueue action after commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Mar 11, 2024
1 parent bf449e8 commit 68a78d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frappe/model/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -1536,11 +1536,16 @@ def queue_action(self, action, **kwargs):
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,
)

Expand Down

0 comments on commit 68a78d3

Please sign in to comment.