diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index cda31390b..d0b4ef427 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -1044,7 +1044,7 @@ namespace IRaCIS.Core.Application.Service var lastLoginIPRegion = await _userLogRepository.Where(t => t.ActionUserName == actionUserName && userOptTypes.Contains(t.OptType)) .OrderByDescending(t => t.CreateTime).Select(t => t.IPRegion).FirstOrDefaultAsync(); - if (lastLoginIPRegion != string.Empty) + if (lastLoginIPRegion!=null&&lastLoginIPRegion != string.Empty) { // 与上一次区域不一致 //if (SplitAndConcatenate(existUserLoginInfo.LastLoginIP) != SplitAndConcatenate(iPRegion))