diff --git a/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-ModerateSectionCorrection.cs b/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-ModerateSectionCorrection.cs index e540ec81..35ab6104 100644 --- a/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-ModerateSectionCorrection.cs +++ b/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-ModerateSectionCorrection.cs @@ -898,7 +898,7 @@ namespace RMuseum.Services.Implementation var deletedUserId = (Guid)(await _appUserService.FindUserByEmail(deletedUserEmail)).Result.Id; var dbCorrection = await _context.GanjoorPoemSectionCorrections.AsNoTracking().Include(c => c.User) - .Where(c => c.Reviewed == false && (deletedUserSections == false || c.UserId == deletedUserId)) + .Where(c => c.Reviewed == false && ((deletedUserSections == false && c.UserId != deletedUserId ) || c.UserId == deletedUserId)) .OrderBy(c => c.Id) .Skip(skip) .FirstOrDefaultAsync(); @@ -1021,7 +1021,7 @@ namespace RMuseum.Services.Implementation string deletedUserEmail = $"{Configuration.GetSection("Ganjoor")["DeleteUserEmail"]}"; var deletedUserId = (Guid)(await _appUserService.FindUserByEmail(deletedUserEmail)).Result.Id; return new RServiceResult(await _context.GanjoorPoemSectionCorrections.AsNoTracking() - .Where(c => c.Reviewed == false && (deletedUserSections == false || c.UserId == deletedUserId)) + .Where(c => c.Reviewed == false && ((deletedUserSections == false && c.UserId != deletedUserId) || c.UserId == deletedUserId)) .CountAsync()); } }