diff --git a/IRaCIS.Core.Application/Service/Common/MailService.cs b/IRaCIS.Core.Application/Service/Common/MailService.cs index 1cc0514cc..27aaf636d 100644 --- a/IRaCIS.Core.Application/Service/Common/MailService.cs +++ b/IRaCIS.Core.Application/Service/Common/MailService.cs @@ -499,6 +499,7 @@ namespace IRaCIS.Application.Services var doctor = await _doctorTypeRepository.FindAsync(doctorId); User sysUserInfo = null; + var userType = await _userTypeRepository.FirstAsync(t => t.UserTypeEnum == UserTypeEnum.IndependentReviewer); using (await _mutex.LockAsync()) { @@ -519,6 +520,7 @@ namespace IRaCIS.Application.Services saveItem.UserTypeEnum = UserTypeEnum.IndependentReviewer; saveItem.DoctorId = doctorId; + saveItem.UserTypeId = userType.Id; sysUserInfo = await _userRepository.AddAsync(saveItem); @@ -530,7 +532,6 @@ namespace IRaCIS.Application.Services } } - var userType= await _userTypeRepository.FirstAsync(t => t.UserTypeEnum== UserTypeEnum.IndependentReviewer); var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == trialId);