diff --git a/web/src/views/repo/pipeline/PipelineWrapper.vue b/web/src/views/repo/pipeline/PipelineWrapper.vue index ee82ec9f9..45a08dfbd 100644 --- a/web/src/views/repo/pipeline/PipelineWrapper.vue +++ b/web/src/views/repo/pipeline/PipelineWrapper.vue @@ -140,18 +140,11 @@ const { doSubmit: cancelPipeline, isLoading: isCancelingPipeline } = useAsyncAct throw new Error('Unexpected: Repo is undefined'); } - if (!pipeline.value?.workflows) { - throw new Error('Unexpected: Pipeline steps not loaded'); + if (!pipeline.value?.number) { + throw new Error('Unexpected: Pipeline number not found'); } - // TODO: is selectedStepId right? - // const step = findStep(pipeline.value.steps, selectedStepId.value || 2); - - // if (!step) { - // throw new Error('Unexpected: Step not found'); - // } - - await apiClient.cancelPipeline(repo.value.id, parseInt(pipelineId.value, 10)); + await apiClient.cancelPipeline(repo.value.id, pipeline.value.number); notifications.notify({ title: i18n.t('repo.pipeline.actions.cancel_success'), type: 'success' }); });