Skip to content

Commit

Permalink
Merge pull request #25321 from frappe/mergify/bp/version-15-hotfix/pr…
Browse files Browse the repository at this point in the history
…-25318

fix: Enqueue action after commit (backport #25318)
  • Loading branch information
ankush committed Mar 11, 2024
2 parents 0ec4bc8 + b1afc29 commit 125f94c
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 125f94c

Please sign in to comment.