Skip to content

Commit 2f331b1

Browse files
Ensure complex accessors from schema don't result in double-bracketing. (#531)
1 parent 2711fd1 commit 2f331b1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/stores/sqlproxy/proxy_store.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"sync"
1616

1717
"github.com/pkg/errors"
18+
"github.com/rancher/steve/pkg/stores/queryhelper"
1819
"github.com/sirupsen/logrus"
1920
"golang.org/x/sync/errgroup"
2021
"k8s.io/apimachinery/pkg/api/meta"
@@ -371,7 +372,7 @@ func getFieldsFromSchema(schema *types.APISchema) [][]string {
371372
}
372373
for _, colDef := range colDefs {
373374
field := strings.TrimPrefix(colDef.Field, "$.")
374-
fields = append(fields, strings.Split(field, "."))
375+
fields = append(fields, queryhelper.SafeSplit(field))
375376
}
376377
return fields
377378
}

0 commit comments

Comments
 (0)