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 (#2351)

(cherry picked from commit 4ba8046)

# Conflicts:
#	hrms/www/hrms.py
  • Loading branch information
ruchamahabal authored and mergify[bot] committed Oct 29, 2024
1 parent 0155017 commit d9b5f02
Show file tree
Hide file tree
Showing 2 changed files with 14 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
13 changes: 13 additions & 0 deletions hrms/www/hrms.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,18 @@ 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(),
}
)
<<<<<<< HEAD
=======

bootinfo.lang = frappe.local.lang
load_translations(bootinfo)

return bootinfo


def get_default_route():
return "/hrms"
>>>>>>> 4ba8046db (fix(PWA): post login redirection fails due to `default_route` conflict with other app (#2351))

0 comments on commit d9b5f02

Please sign in to comment.