Skip to content

Commit 6494ab7

Browse files
AMoreauxabdulrahmancodes
authored andcommitted
Fix bug on sso providers (twentyhq#12841)
1 parent b1f3a46 commit 6494ab7

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.service.ts

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -399,23 +399,24 @@ export class UserWorkspaceService extends TypeOrmQueryService<UserWorkspace> {
399399
displayName: workspace.displayName,
400400
workspaceUrls: this.domainManagerService.getWorkspaceUrls(workspace),
401401
logo: workspace.logo,
402-
sso: workspace.workspaceSSOIdentityProviders.reduce(
403-
(acc, identityProvider) =>
404-
acc.concat(
405-
identityProvider.status === 'Inactive'
406-
? []
407-
: [
408-
{
409-
id: identityProvider.id,
410-
name: identityProvider.name,
411-
issuer: identityProvider.issuer,
412-
type: identityProvider.type,
413-
status: identityProvider.status,
414-
},
415-
],
416-
),
417-
[] as AvailableWorkspace['sso'],
418-
),
402+
sso:
403+
workspace.workspaceSSOIdentityProviders?.reduce(
404+
(acc, identityProvider) =>
405+
acc.concat(
406+
identityProvider.status === 'Inactive'
407+
? []
408+
: [
409+
{
410+
id: identityProvider.id,
411+
name: identityProvider.name,
412+
issuer: identityProvider.issuer,
413+
type: identityProvider.type,
414+
status: identityProvider.status,
415+
},
416+
],
417+
),
418+
[] as AvailableWorkspace['sso'],
419+
) ?? [],
419420
};
420421
}
421422

0 commit comments

Comments
 (0)