Skip to content

Commit

Permalink
fixup! WIP - Move refs from c.desc.Schema to c.Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Oct 2, 2023
1 parent 4a4e605 commit c1e4cfa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions db/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ func NewCollectionIndex(
return nil, NewErrIndexDescHasNoFields(desc)
}
index := &collectionSimpleIndex{collection: collection, desc: desc}
schema := collection.Description().Schema
field, foundField := schema.GetField(desc.Fields[0].Name)
field, foundField := collection.Schema().GetField(desc.Fields[0].Name)
if !foundField {
return nil, NewErrIndexDescHasNonExistingField(desc, desc.Fields[0].Name)
}
Expand Down

0 comments on commit c1e4cfa

Please sign in to comment.