From 9d0a24f3de08d73dd2eb656af6fdc84076d76e3c Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 21 Feb 2024 19:18:21 +0530 Subject: [PATCH] fix: handle email without content adding links (#24994) --- frappe/core/doctype/communication/mixins.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/core/doctype/communication/mixins.py b/frappe/core/doctype/communication/mixins.py index b48385ce49..5735895652 100644 --- a/frappe/core/doctype/communication/mixins.py +++ b/frappe/core/doctype/communication/mixins.py @@ -6,7 +6,7 @@ from frappe.desk.doctype.notification_settings.notification_settings import ( ) from frappe.desk.doctype.todo.todo import ToDo from frappe.email.doctype.email_account.email_account import EmailAccount -from frappe.utils import get_formatted_email, get_url, parse_addr +from frappe.utils import cstr, get_formatted_email, get_url, parse_addr class CommunicationEmailMixin: @@ -147,7 +147,7 @@ class CommunicationEmailMixin: def get_content(self, print_format=None): if print_format and frappe.get_system_settings("attach_view_link"): - return self.content + self.get_attach_link(print_format) + return cstr(self.content) + self.get_attach_link(print_format) return self.content def get_attach_link(self, print_format):