From a88a107718dff88bc9e58f600cf93af364ac6d42 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 18 Feb 2025 19:12:04 +0530 Subject: [PATCH] fix: batch confirmation email template --- .../lms_batch_enrollment/lms_batch_enrollment.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.py b/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.py index 8fd3124c..8de7715e 100644 --- a/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.py +++ b/lms/lms/doctype/lms_batch_enrollment/lms_batch_enrollment.py @@ -79,13 +79,20 @@ def send_mail(doc): batch = frappe.db.get_value( "LMS Batch", doc.batch, - ["name", "title", "start_date", "start_time", "medium"], + [ + "name", + "title", + "start_date", + "start_time", + "medium", + "confirmation_email_template", + ], as_dict=1, ) subject = _("Enrollment Confirmation for {0}").format(batch.title) template = "batch_confirmation" - custom_template = frappe.db.get_single_value( + custom_template = batch.confirmation_email_template or frappe.db.get_single_value( "LMS Settings", "batch_confirmation_template" )