Skip to content

Commit

Permalink
fix: compatible with unset configurations (#7402)
Browse files Browse the repository at this point in the history
  • Loading branch information
abeizn authored Apr 28, 2024
1 parent 804eb20 commit ea2cdbc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions backend/helpers/pluginhelper/api/pipeline_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ func MakePipelinePlanTask(
compareName := pluginName + ":" + subtaskMetas[s].Name
for _, enableSubtask := range enableSubtasksList {
subtaskInfo := strings.Split(enableSubtask, ":")
subtaskInfoName := subtaskInfo[0] + ":" + subtaskInfo[1]
if len(subtaskInfo) > 2 && (subtaskInfoName == compareName) {
v, err := strconv.ParseBool(subtaskInfo[2])
if err != nil {
break
if len(subtaskInfo) > 2 {
subtaskInfoName := subtaskInfo[0] + ":" + subtaskInfo[1]
if subtaskInfoName == compareName {
v, err := strconv.ParseBool(subtaskInfo[2])
if err != nil {
break
}
subtaskMetas[s].EnabledByDefault = v
}
subtaskMetas[s].EnabledByDefault = v
}
}
}
Expand Down

0 comments on commit ea2cdbc

Please sign in to comment.