Skip to content

Commit

Permalink
fix: use aggregate: 1 for getting latest by test (#4560)
Browse files Browse the repository at this point in the history
  • Loading branch information
rangoo94 authored Nov 1, 2023
1 parent 68118d2 commit 9b48e9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/repository/result/mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (r *MongoRepository) GetLatestByTest(ctx context.Context, testName string)
{"$replaceRoot": bson.M{"newRoot": "$doc.content"}},
{"$limit": 1},
}
cursor, err := r.ResultsColl.Aggregate(ctx, pipeline, opts)
cursor, err := r.db.Aggregate(ctx, pipeline, opts)
if err != nil {
return result, err
}
Expand Down

0 comments on commit 9b48e9a

Please sign in to comment.