diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index bd22b5dd7..7d5093d80 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -762,7 +762,8 @@ namespace IRaCIS.Core.Application.Contracts else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager) { - foreach (var group in (siteUserList.GroupBy(t => new { t.Email, t.IsGenerateAccount, t.UserTypeId }))) + foreach (var group in (siteUserList.Where(t=>t.IsGenerateAccount && t.TrialSiteSurveyId==trialSiteSurveyId) + .GroupBy(t => new { t.Email, t.IsGenerateAccount, t.UserTypeId }))) { if (group.Count() > 1) {