瀏覽代碼

Merge pull request #18364 from frappe/mergify/bp/version-14-hotfix/pr-18361

fix: Set email account in Communication only if exists (backport #18361)
version-14
Ritwik Puri 2 年之前
committed by GitHub
父節點
當前提交
59f00b4540
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 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…
取消
儲存