diff --git a/Marco.Pms.Services/Controllers/EmployeeController.cs b/Marco.Pms.Services/Controllers/EmployeeController.cs index 92045d6..1e21c03 100644 --- a/Marco.Pms.Services/Controllers/EmployeeController.cs +++ b/Marco.Pms.Services/Controllers/EmployeeController.cs @@ -612,10 +612,10 @@ namespace MarcoBMS.Services.Controllers if (!string.IsNullOrWhiteSpace(model.Email)) { var emailExists = await _context.Employees - .AnyAsync(e => e.Email == model.Email && e.OrganizationId == organizationId); + .AnyAsync(e => e.Email == model.Email); if (emailExists) { - _logger.LogInfo("Employee email already exists in org. Email={Email}, Org={OrgId}", model.Email, organizationId); + _logger.LogInfo("Employee email already exists. Email={Email}", model.Email); return StatusCode(403, ApiResponse.ErrorResponse( "Employee with email already exists", "Employee with this email already exists", 403)); @@ -845,7 +845,7 @@ namespace MarcoBMS.Services.Controllers if (model.Id == null || model.Id == Guid.Empty) { var emailExists = await _context.Employees - .AnyAsync(e => e.Email == model.Email && e.OrganizationId == organizationId); + .AnyAsync(e => e.Email == model.Email); if (emailExists) {