diff --git a/pdf_on_submit/attach_pdf.py b/pdf_on_submit/attach_pdf.py index cdeb5dd..692774d 100644 --- a/pdf_on_submit/attach_pdf.py +++ b/pdf_on_submit/attach_pdf.py @@ -46,6 +46,7 @@ def attach_pdf(doc, event=None): or frappe.flags.in_test or frappe.conf.developer_mode ), + enqueue_after_commit=True, **args, )