diff --git a/frontend/src/data/session.js b/frontend/src/data/session.js index 8338faa6b9..97d1f3ed6f 100644 --- a/frontend/src/data/session.js +++ b/frontend/src/data/session.js @@ -19,7 +19,7 @@ function handleLogin(response) { employeeResource.reload() session.user = sessionUser() - router.replace(response.default_route || "/") + router.replace({ path: "/" }) } } diff --git a/hrms/www/hrms.py b/hrms/www/hrms.py index cc3ac3f25d..cf34827712 100644 --- a/hrms/www/hrms.py +++ b/hrms/www/hrms.py @@ -25,6 +25,7 @@ def get_boot(): { "site_name": frappe.local.site, "push_relay_server_url": frappe.conf.get("push_relay_server_url") or "", + "default_route": get_default_route(), } ) @@ -32,3 +33,7 @@ def get_boot(): load_translations(bootinfo) return bootinfo + + +def get_default_route(): + return "/hrms"