Skip to content

Commit d90ec1a

Browse files
authored
Merge pull request #178 from Nfactor26/ignore-deleted-fixtures-while-retrieving
Exclude deleted fixtures when retrieving fixtures for a given version of project
2 parents 5fb69ad + cffb400 commit d90ec1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Pixel.Persistence.Respository/TestFixtureRepository.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public async Task<TestFixture> FindByNameAsync(string projectId, string projectV
5757
/// <inheritdoc/>
5858
public async Task<IEnumerable<TestFixture>> GetFixturesAsync(string projectId, string projectVersion, CancellationToken cancellationToken)
5959
{
60-
var filter = Builders<TestFixture>.Filter.And(Builders<TestFixture>.Filter.Eq(x => x.ProjectId, projectId),
61-
Builders<TestFixture>.Filter.Eq(x => x.ProjectVersion, projectVersion));
60+
var filter = Builders<TestFixture>.Filter.Eq(x => x.ProjectId, projectId) & Builders<TestFixture>.Filter.Eq(x => x.ProjectVersion, projectVersion) &
61+
Builders<TestFixture>.Filter.Eq(x => x.IsDeleted, false);
6262
var fixtures = await fixturesCollection.FindAsync(filter, FindOptions, cancellationToken);
6363
return await fixtures.ToListAsync();
6464
}

0 commit comments

Comments
 (0)