From 9133a3f50b9affb9e3d3e6c11aaa8608085b011a Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 1 Nov 2022 12:12:08 +0530 Subject: [PATCH] fix: batch issue --- lms/www/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/www/utils.py b/lms/www/utils.py index 75ddf6c4..c492305b 100644 --- a/lms/www/utils.py +++ b/lms/www/utils.py @@ -17,7 +17,7 @@ def get_common_context(context): context.lessons = get_lessons(course.name) membership = get_membership(course.name, frappe.session.user, batch_name) context.membership = membership - context.batch = membership.batch if membership.batch else None + context.batch = membership.batch if membership and membership.batch else None context.course.query_parameter = "?batch=" + membership.batch if membership and membership.batch else "" context.livecode_url = get_livecode_url()