From 4fd3e2549a4969e5782c152e340b8a15d0159c3a Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Fri, 30 Jan 2026 13:00:49 +0530 Subject: [PATCH] fix: batch access conditions --- lms/lms/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/lms/utils.py b/lms/lms/utils.py index cb28aebc..4e8bcf1e 100644 --- a/lms/lms/utils.py +++ b/lms/lms/utils.py @@ -1195,8 +1195,8 @@ def get_batch_details(batch): ) if can_create_batches(): batch_details.students = batch_students - else: - batch_details.students = [] + elif is_student_enrolled: + batch_details.students = [frappe.session.user] if batch_details.paid_batch and batch_details.start_date >= getdate(): batch_details.amount, batch_details.currency = check_multicurrency(