mirror of
https://github.com/rancher/steve.git
synced 2025-04-28 03:10:32 +00:00
Ensure complex accessors from schema don't result in double-bracketing. (#531)
This commit is contained in:
parent
2711fd1f46
commit
2f331b1a1a
@ -15,6 +15,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rancher/steve/pkg/stores/queryhelper"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/sync/errgroup"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
@ -371,7 +372,7 @@ func getFieldsFromSchema(schema *types.APISchema) [][]string {
|
||||
}
|
||||
for _, colDef := range colDefs {
|
||||
field := strings.TrimPrefix(colDef.Field, "$.")
|
||||
fields = append(fields, strings.Split(field, "."))
|
||||
fields = append(fields, queryhelper.SafeSplit(field))
|
||||
}
|
||||
return fields
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user