Merge pull request #475 from pateljannat/default-view

This commit is contained in:
Jannat Patel
2023-02-08 13:07:16 +05:30
committed by GitHub
2 changed files with 11 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
"field_order": [ "field_order": [
"search_placeholder", "search_placeholder",
"portal_course_creation", "portal_course_creation",
"default_home",
"is_onboarding_complete", "is_onboarding_complete",
"column_break_2", "column_break_2",
"custom_certificate_template", "custom_certificate_template",
@@ -145,12 +146,18 @@
"fieldtype": "Check", "fieldtype": "Check",
"label": "Is Onboarding Complete", "label": "Is Onboarding Complete",
"read_only": 1 "read_only": 1
},
{
"default": "0",
"fieldname": "default_home",
"fieldtype": "Check",
"label": "Make LMS the default home"
} }
], ],
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"issingle": 1, "issingle": 1,
"links": [], "links": [],
"modified": "2022-12-20 11:44:06.317159", "modified": "2023-02-07 19:53:46.073914",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "LMS", "module": "LMS",
"name": "LMS Settings", "name": "LMS Settings",

View File

@@ -294,7 +294,9 @@ def get_country_code():
def on_session_creation(login_manager): def on_session_creation(login_manager):
if frappe.db.get_single_value("System Settings", "setup_complete"): if frappe.db.get_single_value(
"System Settings", "setup_complete"
) and frappe.db.get_single_value("LMS Settings", "default_home"):
frappe.local.response["home_page"] = "/courses" frappe.local.response["home_page"] = "/courses"