Skip to content

Commit

Permalink
fix(PWA): post login redirection fails due to default_route conflic…
Browse files Browse the repository at this point in the history
…t with other app (backport #2351) (#2357)

Co-authored-by: Rucha Mahabal <[email protected]>
fix(PWA): post login redirection fails due to `default_route` conflict with other app (#2351)
  • Loading branch information
mergify[bot] and ruchamahabal authored Oct 29, 2024
1 parent fb87e84 commit 69e62ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/data/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function handleLogin(response) {
employeeResource.reload()

session.user = sessionUser()
router.replace(response.default_route || "/")
router.replace({ path: "/" })
}
}

Expand Down
5 changes: 5 additions & 0 deletions hrms/www/hrms.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,10 @@ 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(),
}
)


def get_default_route():
return "/hrms"

0 comments on commit 69e62ce

Please sign in to comment.