Skip to content

Commit 713fdb8

Browse files
author
iwysiu
committed
divjot comments 2
1 parent 4b8a8cf commit 713fdb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mongo/gridfs/bucket.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,9 @@ func createIndexIfNotExists(ctx context.Context, iv mongo.IndexView, model mongo
518518
return err
519519
}
520520

521-
keyElemDoc := bsoncore.Value{Type: keyElem.Type, Data: keyElem.Value}.Document()
521+
keyElemDoc := keyElem.Document()
522522

523-
found, err := indexDocsEqual(modelKeysDoc, keyElemDoc)
523+
found, err := indexDocsEqual(modelKeysDoc, bsoncore.Document(keyElemDoc))
524524
if err != nil {
525525
return err
526526
}

0 commit comments

Comments
 (0)