From 9e3746bd7dce9a8d2eac6bf616a73f2dd1f5b54e Mon Sep 17 00:00:00 2001 From: Novak Zaballa <41410593+novakzaballa@users.noreply.github.com> Date: Sat, 11 May 2024 13:48:55 -0400 Subject: [PATCH] fix: Organisation id not numeric in organisation settings (#3929) --- frontend/common/stores/account-store.js | 12 +++++++----- frontend/web/components/ProjectsPage.tsx | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/common/stores/account-store.js b/frontend/common/stores/account-store.js index b14197acc99f..23b5c603bfed 100644 --- a/frontend/common/stores/account-store.js +++ b/frontend/common/stores/account-store.js @@ -302,11 +302,13 @@ const controller = { store.model = user if (user && user.organisations) { store.organisation = user.organisations[0] - const cookiedID = API.getCookie('organisation') - const pathID = matchPath(document.location.pathname, { - path: '/organisation/:organisationId', - strict: false, - })?.params?.organisationId + const cookiedID = parseInt(API.getCookie('organisation')) + const pathID = parseInt( + matchPath(document.location.pathname, { + path: '/organisation/:organisationId', + strict: false, + })?.params?.organisationId, + ) const orgId = pathID || cookiedID if (orgId) { const foundOrganisation = user.organisations.find( diff --git a/frontend/web/components/ProjectsPage.tsx b/frontend/web/components/ProjectsPage.tsx index 8bbaeb703a4e..7f36d12613f9 100644 --- a/frontend/web/components/ProjectsPage.tsx +++ b/frontend/web/components/ProjectsPage.tsx @@ -16,7 +16,9 @@ const ProjectsPage: FC = ({ match }) => { {() => { return (
- +
) }}