fix: lesson indexing

This commit is contained in:
pateljannat
2021-07-29 11:54:30 +05:30
parent 508f90f459
commit 33a12c2dec
23 changed files with 230 additions and 226 deletions

View File

@@ -10,12 +10,12 @@ def get_common_context(context):
except KeyError:
batch_name = None
course = Course.find(course_name)
course = frappe.get_doc("LMS Course", course_name)
if not course:
context.template = "www/404.html"
return
context.course = course
context.lessons = course.get_lessons()
membership = course.get_membership(frappe.session.user, batch_name)
context.membership = membership
if membership: