fix: batch issue

This commit is contained in:
Jannat Patel
2022-11-01 12:12:08 +05:30
parent b9f4ba6527
commit 9133a3f50b

View File

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