fix redirect after pull (#7168)

This commit is contained in:
James Gatz 2024-03-12 16:44:04 +01:00 committed by GitHub
parent 30be38b2ed
commit 38f1dcead5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,7 +14,7 @@ import { RequestGroup } from '../../models/request-group';
import { UnitTest } from '../../models/unit-test';
import { UnitTestSuite } from '../../models/unit-test-suite';
import { WebSocketRequest } from '../../models/websocket-request';
import { Workspace } from '../../models/workspace';
import { scopeToActivity, Workspace } from '../../models/workspace';
import {
BackendProject,
Snapshot,
@ -161,8 +161,13 @@ export const pullRemoteCollectionAction: ActionFunction = async ({
remoteProject: project,
});
const workspace = await models.workspace.getById(workspaceId);
invariant(workspace, 'Workspace not found');
const activity = scopeToActivity(workspace?.scope);
return redirect(
`/organization/${organizationId}/project/${projectId}/workspace/${workspaceId}/debug`
`/organization/${organizationId}/project/${projectId}/workspace/${workspaceId}/${activity}`
);
};