Merge pull request #35650 from iamejaaz/email-after-commit-issue
fix: run after commit only if queue available
This commit is contained in:
commit
3642b94cf9
1 changed files with 1 additions and 1 deletions
|
|
@ -243,6 +243,6 @@ def sendmail(
|
|||
# build email queue and send the email if send_now is True.
|
||||
|
||||
q = builder.process(send_now=False)
|
||||
if now:
|
||||
if now and q:
|
||||
frappe.db.after_commit.add(q.send)
|
||||
return q
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue