diff --git a/src/Application/Features/QualityAssurance/Commands/SubmitToProviderQa.cs b/src/Application/Features/QualityAssurance/Commands/SubmitToProviderQa.cs index 33c93d0c..7de72eaf 100644 --- a/src/Application/Features/QualityAssurance/Commands/SubmitToProviderQa.cs +++ b/src/Application/Features/QualityAssurance/Commands/SubmitToProviderQa.cs @@ -80,7 +80,9 @@ private async Task MustBeScored(string identifier, CancellationToken cance { var assessments = await _unitOfWork.DbContext.ParticipantAssessments .Include(pa => pa.Scores) - .ToArrayAsync(cancellationToken); + .Where(pa => pa.ParticipantId == identifier) + .ToArrayAsync(cancellationToken) + ; var latest = assessments.MaxBy(a => a.Created); @@ -106,6 +108,7 @@ private async Task MustHaveTwoReds(string identifier, CancellationToken ca { var assessments = await _unitOfWork.DbContext.ParticipantAssessments .Include(pa => pa.Scores) + .Where(pa=>pa.ParticipantId == identifier) .ToArrayAsync(cancellationToken); var latest = assessments.MaxBy(a => a.Created);