瀏覽代碼

fix: type-error in email signature code (#18353) (#18363)

* fix: type-error in email signature code

* refactor: import

[skip ci]

Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 768daf0961)

Co-authored-by: stephen <stephenBDT@users.noreply.github.com>
version-14
mergify[bot] 2 年之前
committed by GitHub
父節點
當前提交
271e4d69ce
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      frappe/core/doctype/communication/communication.py

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

@@ -19,6 +19,7 @@ from frappe.core.doctype.communication.mixins import CommunicationEmailMixin
from frappe.core.utils import get_parent_doc
from frappe.model.document import Document
from frappe.utils import (
cstr,
parse_addr,
split_emails,
strip_html,
@@ -175,7 +176,7 @@ class Communication(Document, CommunicationEmailMixin):
if html_signature:
_signature = html_signature.renderContents()

if (_signature or signature) not in self.content:
if (cstr(_signature) or signature) not in self.content:
self.content = f'{self.content}</p><br><p class="signature">{signature}'

def before_save(self):


Loading…
取消
儲存