From f2267bec25e9edb1b947b9ac21c652a6daaec78c Mon Sep 17 00:00:00 2001 From: leela Date: Wed, 14 Jul 2021 10:28:10 +0530 Subject: [PATCH] fix: sending document as an attachment through mail Currently sending document as an attachment is failing and the fix is to make it work by fixing the bug introduced in latest refactoring. --- 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 160018c4a2..09a8a0ac22 100644 --- a/frappe/core/doctype/communication/mixins.py +++ b/frappe/core/doctype/communication/mixins.py @@ -176,8 +176,8 @@ class CommunicationEmailMixin: def mail_attachments(self, print_format=None, print_html=None): final_attachments = [] - if print_format and print_html: - d = {'print_format': print_format, 'print_html': print_html, 'print_format_attachment': 1, + if print_format or print_html: + d = {'print_format': print_format, 'html': print_html, 'print_format_attachment': 1, 'doctype': self.reference_doctype, 'name': self.reference_name} final_attachments.append(d)