瀏覽代碼

fix: Set email account in Communication only if exists (#18361)

(cherry picked from commit e821699c82)
version-14
Nabin Hait 2 年之前
committed by Mergify
父節點
當前提交
3282805294
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      frappe/core/doctype/communication/mixins.py

+ 2
- 1
frappe/core/doctype/communication/mixins.py 查看文件

@@ -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…
取消
儲存