Skip to content

Commit a90b037

Browse files
committed
update findProvidersForFilter
1 parent 72d7e1f commit a90b037

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

pkg/storage/registry/spaces/spaces.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,15 +364,14 @@ func (r *registry) findProvidersForFilter(ctx context.Context, filters []*provid
364364
currentUser := ctxpkg.ContextMustGetUser(ctx)
365365
providerInfos := []*registrypb.ProviderInfo{}
366366
for address, provider := range r.c.Providers {
367-
367+
// skip mismatching storageproviders
368+
if storageId != "" && storageId != provider.ProviderID {
369+
continue
370+
}
368371
// when a specific space type is requested we may skip this provider altogether if it is not configured for that type
369372
// we have to ignore a space type filter with +grant or +mountpoint type because they can live on any provider
370373
if requestedSpaceType != "" && !strings.HasPrefix(requestedSpaceType, "+") {
371374
found := false
372-
if storageId != "" && storageId != provider.ProviderID {
373-
// skip mismatching storageproviders
374-
continue
375-
}
376375
for spaceType := range provider.Spaces {
377376
if spaceType == requestedSpaceType {
378377
found = true

0 commit comments

Comments
 (0)