Merge pull request #45345 from thaJeztah/no_version_loop
api/server: getImagesJSON(): don't check version in a loop
This commit is contained in:
commit
ad2ab4927c
1 changed files with 2 additions and 1 deletions
|
@ -356,8 +356,9 @@ func (ir *imageRouter) getImagesJSON(ctx context.Context, w http.ResponseWriter,
|
|||
return err
|
||||
}
|
||||
|
||||
useNone := versions.LessThan(version, "1.43")
|
||||
for _, img := range images {
|
||||
if versions.LessThan(version, "1.43") {
|
||||
if useNone {
|
||||
if len(img.RepoTags) == 0 && len(img.RepoDigests) == 0 {
|
||||
img.RepoTags = append(img.RepoTags, "<none>:<none>")
|
||||
img.RepoDigests = append(img.RepoDigests, "<none>@<none>")
|
||||
|
|
Loading…
Reference in a new issue