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()