Skip to content

[dashboard] Ensure we always send an organizationId if we need to! #16993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions components/dashboard/src/workspaces/CreateWorkspacePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,18 @@ export function CreateWorkspacePage() {
return;
}

const organizationId = currentOrg?.id;
console.log("organizationId: " + JSON.stringify(organizationId));
if (!organizationId && !!user?.additionalData?.isMigratedToTeamOnlyAttribution) {
// We need an organizationId for this group of users
console.warn("Skipping createWorkspace");
return;
}

try {
const result = await createWorkspaceMutation.mutateAsync({
contextUrl: contextURL,
organizationId: currentOrg?.id,
organizationId,
...opts,
});
if (result.workspaceURL) {
Expand All @@ -139,7 +147,7 @@ export function CreateWorkspacePage() {
console.log(error);
}
},
[createWorkspaceMutation, history, contextURL, selectedIde, selectedWsClass, currentOrg?.id, useLatestIde],
[createWorkspaceMutation, history, contextURL, selectedIde, selectedWsClass, currentOrg?.id, user?.additionalData?.isMigratedToTeamOnlyAttribution, useLatestIde],
);

// Need a wrapper here so we call createWorkspace w/o any arguments
Expand Down