Skip to content

Commit 4c5579e

Browse files
committed
Remove downstream node check for canDelete
1 parent 482f14f commit 4c5579e

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/components/cdPipeline/NewCDPipeline.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export default function NewCDPipeline({
6464
location,
6565
appName,
6666
close,
67-
downstreamNodeSize,
6867
getWorkflows,
6968
refreshParentWorkflows,
7069
envIds,
@@ -898,7 +897,7 @@ export default function NewCDPipeline({
898897

899898
const renderSecondaryButton = () => {
900899
if (cdPipelineId) {
901-
const canDeletePipeline = isLastNode //?? downstreamNodeSize === 0
900+
const canDeletePipeline = isLastNode
902901
const message =
903902
!canDeletePipeline ? 'This Pipeline cannot be deleted as it has connected CD pipeline' : ''
904903
return (

src/components/workflowEditor/workflowEditor.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,14 +353,12 @@ class WorkflowEdit extends Component<WorkflowEditProps, WorkflowEditState> {
353353
)}
354354
render={({ location, match }: { location: any; match: any }) => {
355355
const cdNode = this.state.allDeploymentNodeMap.get(match.params.cdPipelineId)
356-
const downstreamNodeSize = cdNode?.downstreams?.length ?? 0
357356
return (
358357
<NewCDPipeline
359358
match={match}
360359
location={location}
361360
appName={this.state.appName}
362361
close={this.closePipeline}
363-
downstreamNodeSize={downstreamNodeSize}
364362
getWorkflows={this.getWorkflows}
365363
refreshParentWorkflows={this.props.getWorkflows}
366364
envIds={this.state.envIds}

0 commit comments

Comments
 (0)