Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions static/app/views/investigations/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ type FavoriteVariables = {

type DeleteBlockVariables = {
block: InvestigationBlock;
investigationVersion: number;
notebookVersion: number;
};

type StopExecutionVariables = {
Expand Down Expand Up @@ -530,7 +530,7 @@ export function useRenameInvestigationMutation(
},
}),
method: 'PUT',
data: {title, investigationVersion: current.version},
data: {title, notebookVersion: current.version},
});
},
onSuccess: async (updated, savedTitle, onMutateResult, context) => {
Expand Down Expand Up @@ -573,7 +573,7 @@ export function useDeleteInvestigationBlockMutation(

return useMutation({
...options,
mutationFn: ({block, investigationVersion}) => {
mutationFn: ({block, notebookVersion}) => {
return fetchMutation<void>({
url: getApiUrl(
'/organizations/$organizationIdOrSlug/notebooks/$notebookId/blocks/$blockId/',
Expand All @@ -587,7 +587,7 @@ export function useDeleteInvestigationBlockMutation(
),
method: 'DELETE',
data: {
investigationVersion,
notebookVersion,
version: block.version,
},
});
Expand Down Expand Up @@ -1004,7 +1004,7 @@ export function useDeleteInvestigationMutation(
},
}),
method: 'DELETE',
data: {investigationVersion: investigation.version},
data: {notebookVersion: investigation.version},
}),
options,
{invalidateCandidates: true}
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/investigations/detail/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function InvestigationNotebookBlockInner({
onConfirm: () =>
deleteMutation.mutate({
block,
investigationVersion: investigation.version,
notebookVersion: investigation.version,
}),
}),
},
Expand Down
10 changes: 5 additions & 5 deletions static/app/views/investigations/detail/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2855,7 +2855,7 @@ describe('Investigation detail', () => {
expect(deleteRequest).toHaveBeenCalledWith(
`${detailUrl}blocks/${block.id}/`,
expect.objectContaining({
data: {investigationVersion: 1, version: 1},
data: {notebookVersion: 1, version: 1},
})
)
);
Expand All @@ -2881,7 +2881,7 @@ describe('Investigation detail', () => {
expect(deleteRequest).toHaveBeenCalledWith(
`${detailUrl}blocks/${block.id}/`,
expect.objectContaining({
data: {investigationVersion: 1, version: 1},
data: {notebookVersion: 1, version: 1},
})
)
);
Expand Down Expand Up @@ -3375,7 +3375,7 @@ describe('Investigation detail', () => {
expect.objectContaining({
data: {
title: 'Renamed',
investigationVersion: 1,
notebookVersion: 1,
},
})
)
Expand Down Expand Up @@ -3474,7 +3474,7 @@ describe('Investigation detail', () => {
expect(renameRequest).toHaveBeenCalledWith(
detailUrl,
expect.objectContaining({
data: {title: 'Saved before leaving', investigationVersion: 1},
data: {title: 'Saved before leaving', notebookVersion: 1},
})
)
);
Expand Down Expand Up @@ -3661,7 +3661,7 @@ describe('Investigation detail', () => {
await waitFor(() =>
expect(deleteRequest).toHaveBeenCalledWith(
detailUrl,
expect.objectContaining({data: {investigationVersion: 1}})
expect.objectContaining({data: {notebookVersion: 1}})
)
);
await act(() => jest.advanceTimersByTimeAsync(600));
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/investigations/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ describe('Explore Investigations', () => {
await waitFor(() =>
expect(deleteRequest).toHaveBeenCalledWith(
'/organizations/org-slug/notebooks/1/',
expect.objectContaining({data: {investigationVersion: 3}})
expect.objectContaining({data: {notebookVersion: 3}})
)
);
await waitFor(() =>
Expand Down
Loading