Skip to content

Commit

Permalink
fix: Organisation id not numeric in organisation settings (#3929)
Browse files Browse the repository at this point in the history
  • Loading branch information
novakzaballa committed May 11, 2024
1 parent 132ef77 commit 9e3746b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 7 additions & 5 deletions frontend/common/stores/account-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 3 additions & 1 deletion frontend/web/components/ProjectsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const ProjectsPage: FC<ProjectsPageType> = ({ match }) => {
{() => {
return (
<div className='app-container container'>
<ProjectManageWidget organisationId={match.params.organisationId} />
<ProjectManageWidget
organisationId={parseInt(match.params.organisationId)}
/>
</div>
)
}}
Expand Down

0 comments on commit 9e3746b

Please sign in to comment.