mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Scopes: Fix logic in find call (#87565)
With Find, if the parent query parameter is empty or not provided, we want to list the top level of the forest.
This commit is contained in:
parent
c3936bbae2
commit
baed7d6dbe
@ -82,7 +82,7 @@ func (r *findREST) Connect(ctx context.Context, name string, opts runtime.Object
|
||||
}
|
||||
|
||||
for _, item := range all.Items {
|
||||
if parent != item.Spec.ParentName && parent != "" {
|
||||
if parent != item.Spec.ParentName {
|
||||
continue // Someday this will have an index in raw storage on parentName
|
||||
}
|
||||
results.Items = append(results.Items, scope.TreeItem{
|
||||
|
Loading…
Reference in New Issue
Block a user