commit | b7874157f7e84ba70aae325b926208d2157632ee | [log] [tgz] |
---|---|---|
author | Shivam Mishra <scm.mymail@gmail.com> | Wed May 29 15:15:59 2019 +0530 |
committer | Shivam Mishra <scm.mymail@gmail.com> | Wed May 29 15:15:59 2019 +0530 |
tree | a1303e273c04f1fed67784942033e654ec536ef2 | |
parent | 65681bf31781141e6c27a81c50a988ef0befe4b1 [diff] |
refactor: /lms redirects to home if lms is disbaled
diff --git a/erpnext/www/lms/index.py b/erpnext/www/lms/index.py index 99dcb65..15ca0b4 100644 --- a/erpnext/www/lms/index.py +++ b/erpnext/www/lms/index.py
@@ -6,6 +6,9 @@ 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()