Browse Source

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 years ago
committed by GitHub
parent
commit
271e4d69ce
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      frappe/core/doctype/communication/communication.py

+ 2
- 1
frappe/core/doctype/communication/communication.py View File

@@ -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…
Cancel
Save