fix: run after commit only if queue available
This commit is contained in:
parent
922c1b812d
commit
6861d34e20
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