Merge pull request #13612 from marination/premature-commit-in-communication-develop

fix: Premature commit via notification's `send_an_email`
This commit is contained in:
gavin 2021-06-30 11:56:34 +05:30 committed by GitHub
commit a919761d8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,8 +85,6 @@ def make(doctype=None, name=None, content=None, subject=None, sent_or_received =
if attachments:
add_attachments(comm.name, attachments)
frappe.db.commit()
if cint(send_email):
if not comm.get_outgoing_email_account():
frappe.throw(msg=OUTGOING_EMAIL_ACCOUNT_MISSING, exc=frappe.OutgoingEmailError)