diff --git a/erpnext/www/lms/index.py b/erpnext/www/lms/index.py index 99dcb651aa1..15ca0b46287 100644 --- a/erpnext/www/lms/index.py +++ b/erpnext/www/lms/index.py @@ -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()