From bf89f3ba2f60598f74b4131468327a5d1b120cd1 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 24 Feb 2026 13:01:29 +0530 Subject: [PATCH] fix: show system timezone in certificate request --- frontend/src/components/UpcomingEvaluations.vue | 2 +- .../lms_certificate_request.py | 12 ++---------- .../emails/certificate_request_notification.html | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/UpcomingEvaluations.vue b/frontend/src/components/UpcomingEvaluations.vue index 567d560f..5e650c8f 100644 --- a/frontend/src/components/UpcomingEvaluations.vue +++ b/frontend/src/components/UpcomingEvaluations.vue @@ -202,7 +202,7 @@ const openEvalCall = (evl) => { const evaluationCourses = computed(() => { return props.courses.filter((course) => { - return course.evaluator != '' + return course.evaluator && course.evaluator != '' }) }) diff --git a/lms/lms/doctype/lms_certificate_request/lms_certificate_request.py b/lms/lms/doctype/lms_certificate_request/lms_certificate_request.py index 4e7b93b5..7d56a60c 100644 --- a/lms/lms/doctype/lms_certificate_request/lms_certificate_request.py +++ b/lms/lms/doctype/lms_certificate_request/lms_certificate_request.py @@ -13,6 +13,7 @@ from frappe.utils import ( format_time, get_datetime, get_fullname, + get_system_timezone, get_time, getdate, nowtime, @@ -118,16 +119,7 @@ class LMSCertificateRequest(Document): def validate_timezone(self): if self.timezone: return - if self.batch_name: - timezone = frappe.db.get_value("LMS Batch", self.batch_name, "timezone") - if timezone: - self.timezone = timezone - return - if self.course: - timezone = frappe.db.get_value("LMS Course", self.course, "timezone") - if timezone: - self.timezone = timezone - return + self.timezone = get_system_timezone() def send_notification(self): outgoing_email_account = frappe.get_cached_value( diff --git a/lms/templates/emails/certificate_request_notification.html b/lms/templates/emails/certificate_request_notification.html index 5b3d027c..65a69a05 100644 --- a/lms/templates/emails/certificate_request_notification.html +++ b/lms/templates/emails/certificate_request_notification.html @@ -1,6 +1,6 @@

{{ _("Hey {0}").format(member_name) }}


-

{{ _('Your evaluation for the course {0} has been scheduled on {1} at {2} {3}.').format(course, date, start_time, timezone) }}

+

{{ _('Your evaluation for the course {0} has been scheduled on {1} at {2} ({3} time).').format(course, date, start_time, timezone) }}


{{ _("Your evaluator is {0}").format(evaluator) }}