Skip to content

Commit

Permalink
Disable duplicate check on user import
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad committed Oct 2, 2024
1 parent 3f8ec6e commit 6143a2c
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,14 @@ public async Task Process(Guid userImportJobId)

var dateOfBirth = DateOnly.ParseExact(row!.DateOfBirth!, "ddMMyyyy", CultureInfo.InvariantCulture);
// Validate for potential duplicates
var existingUsers = await _userSearchService.FindUsers(firstName, lastName, dateOfBirth);
if (existingUsers.Any(u => u.EmailAddress != row.EmailAddress!))
{
errors.Add("Potential duplicate user");
userImportJobRow.Notes = errors;
userImportJobRow.UserImportRowResult = UserImportRowResult.Invalid;
}
else
//var existingUsers = await _userSearchService.FindUsers(firstName, lastName, dateOfBirth);
//if (existingUsers.Any(u => u.EmailAddress != row.EmailAddress!))
//{
// errors.Add("Potential duplicate user");
// userImportJobRow.Notes = errors;
// userImportJobRow.UserImportRowResult = UserImportRowResult.Invalid;
//}
//else
{
user = new User
{
Expand Down

0 comments on commit 6143a2c

Please sign in to comment.