refactor: /lms redirects to home if lms is disbaled

This commit is contained in:
Shivam Mishra 2019-05-29 15:15:59 +05:30
parent 65681bf317
commit b7874157f7

View File

@ -6,6 +6,9 @@ no_cache = 1
def get_context(context):
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()