Skip to content

Commit 2d942f4

Browse files
squakezgansheer
authored andcommitted
fix(api): count all sources only once
Closes #6098
1 parent 744d9dd commit 2d942f4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pkg/apis/camel/v1/integration_types_support.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,16 @@ func (in *Integration) AllSources() []SourceSpec {
9090
if len(in.Status.GeneratedSources) == 0 {
9191
sources = append(sources, src)
9292
} else {
93+
found := false
9394
for _, genSrc := range in.Status.GeneratedSources {
94-
if src.Name != genSrc.Name {
95-
sources = append(sources, src)
95+
if src.Name == genSrc.Name {
96+
found = true
97+
break
9698
}
9799
}
100+
if !found {
101+
sources = append(sources, src)
102+
}
98103
}
99104
}
100105

0 commit comments

Comments
 (0)