Merge pull request #23049 from vdemeester/search-validate-before-call
Validate filter values before calling registry.
This commit is contained in:
commit
ab9204c826
1 changed files with 5 additions and 5 deletions
|
@ -32,11 +32,6 @@ func (daemon *Daemon) SearchRegistryForImages(ctx context.Context, filtersArgs s
|
|||
return nil, err
|
||||
}
|
||||
|
||||
unfilteredResult, err := daemon.RegistryService.Search(ctx, term, authConfig, dockerversion.DockerUserAgent(ctx), headers)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var isAutomated, isOfficial bool
|
||||
var hasStarFilter = 0
|
||||
if searchFilters.Include("is-automated") {
|
||||
|
@ -66,6 +61,11 @@ func (daemon *Daemon) SearchRegistryForImages(ctx context.Context, filtersArgs s
|
|||
}
|
||||
}
|
||||
|
||||
unfilteredResult, err := daemon.RegistryService.Search(ctx, term, authConfig, dockerversion.DockerUserAgent(ctx), headers)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
filteredResults := []registrytypes.SearchResult{}
|
||||
for _, result := range unfilteredResult.Results {
|
||||
if searchFilters.Include("is-automated") {
|
||||
|
|
Loading…
Reference in a new issue