Checking in organization not in tenant

This commit is contained in:
ashutosh.nehete 2025-10-01 12:19:03 +05:30
parent 5eda1773b7
commit 87c5de87a1

View File

@ -1008,7 +1008,7 @@ namespace MarcoBMS.Services.Controllers
Guid tenantId = _userHelper.GetTenantId(); Guid tenantId = _userHelper.GetTenantId();
var LoggedEmployee = await _userHelper.GetCurrentEmployeeAsync(); var LoggedEmployee = await _userHelper.GetCurrentEmployeeAsync();
Employee? employee = await _context.Employees.FirstOrDefaultAsync(e => e.Id == id && e.TenantId == tenantId); Employee? employee = await _context.Employees.FirstOrDefaultAsync(e => e.Id == id && e.OrganizationId == organizationId);
if (employee == null) if (employee == null)
{ {
_logger.LogWarning("Employee with ID {EmploueeId} not found in database", id); _logger.LogWarning("Employee with ID {EmploueeId} not found in database", id);