Skip to content

Commit cffb400

Browse files
committed
Exclude deleted fixtures when retrieving fixtures for a given version of project
Deleted fixtures should not be retrieved when getting fixtures for a given version of project
1 parent 5fb69ad commit cffb400

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)