fix: replaced instances of batch to batch_old
This commit is contained in:
@@ -4,8 +4,8 @@ import frappe
|
||||
def get_context(context):
|
||||
context.no_cache = 1
|
||||
batch_name = frappe.form_dict["batch"]
|
||||
context.batch = frappe.get_doc("LMS Batch Old", batch_name)
|
||||
context.already_a_member = context.batch.is_member(frappe.session.user)
|
||||
context.batch.course_title = frappe.db.get_value(
|
||||
"LMS Course", context.batch.course, "title"
|
||||
context.batch_old = frappe.get_doc("LMS Batch Old", batch_name)
|
||||
context.already_a_member = context.batch_old.is_member(frappe.session.user)
|
||||
context.batch_old.course_title = frappe.db.get_value(
|
||||
"LMS Course", context.batch_old.course, "title"
|
||||
)
|
||||
|
||||
@@ -72,7 +72,7 @@ def get_context(context):
|
||||
context.page_extensions = get_page_extensions(context)
|
||||
context.page_context = {
|
||||
"course": context.course.name,
|
||||
"batch": context.batch,
|
||||
"batch": context.batch_old,
|
||||
"lesson": context.lesson.name if context.lesson.name else "New Lesson",
|
||||
"is_member": context.membership is not None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user