fix: Set email account in Communication only if exists (#18361)
This commit is contained in:
parent
768daf0961
commit
e821699c82
1 changed files with 2 additions and 1 deletions
|
|
@ -165,7 +165,8 @@ class CommunicationEmailMixin:
|
|||
)
|
||||
|
||||
if self.sent_or_received == "Sent" and self._outgoing_email_account:
|
||||
self.db_set("email_account", self._outgoing_email_account.name)
|
||||
if frappe.db.exists("Email Account", self._outgoing_email_account.name):
|
||||
self.db_set("email_account", self._outgoing_email_account.name)
|
||||
|
||||
return self._outgoing_email_account
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue