Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions cmd/index/eus/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ func remove(nonHeadBundles []string, headBundle string) []string {
}

func getMaxOcp(modelOrDb interface{}, channelGrouping channelGrouping) []string {
var maxOcpPerChannelSQL []string // already ordered
maxOcpPerChannel := make([]string, len(channelGrouping.ChannelNames))
switch modelOrDb := modelOrDb.(type) {
case *sql.DB:
Expand All @@ -477,18 +478,18 @@ func getMaxOcp(modelOrDb interface{}, channelGrouping channelGrouping) []string
return nil
}
if !row.Next() {
maxOcpPerChannel = append(maxOcpPerChannel, "")
maxOcpPerChannelSQL = append(maxOcpPerChannelSQL, "")
continue
} else {
var maxOpenShiftVersion string
err = row.Scan(&maxOpenShiftVersion)
if err == nil {
maxOcpPerChannel = append(maxOcpPerChannel, maxOpenShiftVersion)
maxOcpPerChannelSQL = append(maxOcpPerChannelSQL, stripQuotes([]byte(maxOpenShiftVersion)))
}
}
row.Close()
}
return maxOcpPerChannel
return maxOcpPerChannelSQL
case model.Model:
for _, Package := range modelOrDb {
if Package.Name == channelGrouping.OperatorName {
Expand Down