We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 00442c5 + e69eb4f commit 2cb6c22Copy full SHA for 2cb6c22
pkg/microservice/aslan/core/workflow/service/workflow/job/job_build.go
@@ -135,10 +135,12 @@ func (j *BuildJob) ClearSelectionField() error {
135
if err := commonmodels.IToi(j.job.Spec, j.spec); err != nil {
136
return err
137
}
138
-
139
chosenObject := make([]*commonmodels.ServiceAndBuild, 0)
140
141
- j.spec.ServiceAndBuilds = chosenObject
+ // some weird logic says we shouldn't clear user's selection if there are only one service in the selection pool.
+ if len(j.spec.ServiceAndBuilds) != 1 {
142
+ j.spec.ServiceAndBuilds = chosenObject
143
+ }
144
j.job.Spec = j.spec
145
return nil
146
0 commit comments