From e6df555e0b8e1148a5ce2a2dd95bddc2b2a54c91 Mon Sep 17 00:00:00 2001 From: Marica Date: Thu, 19 Dec 2024 14:28:28 +0530 Subject: [PATCH] fix: Enqueue PDF creation after commit to avoid stale doc values (#51) --- pdf_on_submit/attach_pdf.py | 1 + 1 file changed, 1 insertion(+) 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, )