fix bug from merge

This commit is contained in:
Travis 2021-02-12 20:32:12 -06:00
parent 5b237cae13
commit b89c699a8e
No known key found for this signature in database
GPG key ID: 37080CC2042BA34E

5
api.go
View file

@ -1009,7 +1009,10 @@ func (api *API) Schema(ctx context.Context, withViews bool) ([]*IndexInfo, error
func (api *API) SchemaDetails(ctx context.Context) ([]*IndexInfo, error) {
span, _ := tracing.StartSpanFromContext(ctx, "API.Schema")
defer span.Finish()
schema := api.holder.Schema(false)
schema, err := api.holder.Schema()
if err != nil {
return nil, errors.Wrap(err, "getting schema")
}
for _, index := range schema {
for _, field := range index.Fields {
q := fmt.Sprintf("Count(Distinct(field=%s))", field.Name)