fix: get_doc references

This commit is contained in:
Jannat Patel
2022-02-10 09:53:08 +05:30
parent e17637d27b
commit fd5b7976e7
21 changed files with 334 additions and 286 deletions

View File

@@ -1,5 +1,6 @@
import frappe
from school.lms.doctype.lms_settings.lms_settings import check_profile_restriction
from school.www.utils import get_membership
def get_context(context):
context.no_cache = 1
@@ -16,7 +17,7 @@ def get_context(context):
raise frappe.Redirect
context.course = course
membership = course.get_membership(frappe.session.user)
membership = get_membership(course.name, frappe.session.user)
context.course.query_parameter = "?batch=" + membership.batch if membership and membership.batch else ""
context.membership = membership
if context.course.upcoming: