Skip to content

Commit b539a2e

Browse files
committed
target platform empty check
1 parent dbb1472 commit b539a2e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkg/pipeline/adapter/adapter.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,13 @@ func GetStepVariableDto(variable *repository.PipelineStageStepVariable) (*pipeli
380380
return variableDto, nil
381381
}
382382

383-
func GetTargetPlatformObjectFromString(targetPlatform string) []pipelineConfigBean.TargetPlatform {
384-
targetPlatforms := GetTargetPlatformListFromString(targetPlatform)
383+
func GetTargetPlatformObjectFromString(targetPlatformString string) []pipelineConfigBean.TargetPlatform {
384+
targetPlatforms := GetTargetPlatformListFromString(targetPlatformString)
385385
var targetPlatformObject []pipelineConfigBean.TargetPlatform
386386
for _, targetPlatform := range targetPlatforms {
387-
targetPlatformObject = append(targetPlatformObject, pipelineConfigBean.TargetPlatform{Name: targetPlatform})
387+
if len(targetPlatform) == 0 {
388+
targetPlatformObject = append(targetPlatformObject, pipelineConfigBean.TargetPlatform{Name: targetPlatform})
389+
}
388390
}
389391
return targetPlatformObject
390392
}

0 commit comments

Comments
 (0)