diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index 25ee0428b..b6900a32f 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -1191,7 +1191,7 @@ namespace IRaCIS.Core.Application.Contracts var userEmail = item.Key; - var userTypeIdList = item.Select(t => t.UserTypeId).ToList(); + var userTypeIdList = item.Select(t => t.UserTypeId).Distinct().ToList(); var existSysUser = await _identityUserRepository.Where(t => t.EMail == userEmail, true).Include(t => t.UserRoleList).FirstOrDefaultAsync(); @@ -1322,7 +1322,7 @@ namespace IRaCIS.Core.Application.Contracts - foreach (var userTypeId in userTypeIdList.Distinct()) + foreach (var userTypeId in userTypeIdList) { var findTrialUserRole = findTrialUser.TrialUserRoleList.Where(t => t.UserRole?.UserTypeId == userTypeId).FirstOrDefault();