From 043d9e39860138ba66ea5ea85978b114a9a6664a Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 27 Feb 2024 22:30:01 +0530 Subject: [PATCH] fix: Email Template None not found (#40167) --- .../doctype/request_for_quotation/request_for_quotation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py index 1a9dbab715f..f261773b814 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -266,6 +266,10 @@ class RequestforQuotation(BuyingController): "user_fullname": full_name, } ) + + if not self.email_template: + return + email_template = frappe.get_doc("Email Template", self.email_template) message = frappe.render_template(email_template.response_, doc_args) subject = frappe.render_template(email_template.subject, doc_args)