Skip to content

Commit de647dd

Browse files
committed
remove unused fallback
1 parent 86ff5dd commit de647dd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/sim/lib/workspaces/policy.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,13 @@ export async function getWorkspaceCreationPolicy({
183183
)[0]?.role
184184

185185
if (activeOrganizationId && !orgRole) {
186+
const billedAccountUserId = await requireOrganizationOwnerId(activeOrganizationId)
187+
186188
return {
187189
canCreate: false,
188190
workspaceMode: WORKSPACE_MODE.ORGANIZATION,
189191
organizationId: activeOrganizationId,
190-
billedAccountUserId: (await getOrganizationOwnerId(activeOrganizationId)) ?? userId,
192+
billedAccountUserId,
191193
maxWorkspaces: null,
192194
currentWorkspaceCount: 0,
193195
reason: 'Only organization owners and admins can create organization workspaces.',

0 commit comments

Comments
 (0)