Skip to content

Commit 0dc7b9d

Browse files
authored
fix(executors/mongo): use SetProjection in projection option (#902)
Signed-off-by: Jean Schmitt <github@jeanschmitt.fr>
1 parent 8542fb5 commit 0dc7b9d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

executors/mongo/mongo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ func (e Executor) Run(ctx context.Context, step venom.TestStep) (any, error) {
239239
if err := bson.UnmarshalExtJSON([]byte(findAction.Options.Projection), false, &projection); err != nil {
240240
return nil, err
241241
}
242-
findOptions = append(findOptions, options.Find().SetSort(projection))
242+
findOptions = append(findOptions, options.Find().SetProjection(projection))
243243
}
244244

245245
cursor, err := mongoClient.Database(e.Database).Collection(e.Collection).Find(ctx, filter, findOptions...)

0 commit comments

Comments
 (0)