refactor: /lms redirects to home if lms is disbaled
This commit is contained in:
parent
65681bf317
commit
b7874157f7
@ -6,6 +6,9 @@ no_cache = 1
|
|||||||
|
|
||||||
def get_context(context):
|
def get_context(context):
|
||||||
context.education_settings = frappe.get_single("Education Settings")
|
context.education_settings = frappe.get_single("Education Settings")
|
||||||
|
if not context.education_settings.enable_lms:
|
||||||
|
frappe.local.flags.redirect_location = '/'
|
||||||
|
raise frappe.Redirect
|
||||||
context.featured_programs = get_featured_programs()
|
context.featured_programs = get_featured_programs()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user