From bac61ebf883dde99e688800e2e4f9d4271cb8aca Mon Sep 17 00:00:00 2001 From: James Griffiths Date: Tue, 26 Mar 2024 11:10:10 +0000 Subject: [PATCH] EHD-1033: Include Retired organisations in data download --- .../ScheduledJobs/UpdatePublicFacingDownloadFilesJob.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GenderPayGap.WebUI/BackgroundJobs/ScheduledJobs/UpdatePublicFacingDownloadFilesJob.cs b/GenderPayGap.WebUI/BackgroundJobs/ScheduledJobs/UpdatePublicFacingDownloadFilesJob.cs index d3d19fe36..4cb220914 100644 --- a/GenderPayGap.WebUI/BackgroundJobs/ScheduledJobs/UpdatePublicFacingDownloadFilesJob.cs +++ b/GenderPayGap.WebUI/BackgroundJobs/ScheduledJobs/UpdatePublicFacingDownloadFilesJob.cs @@ -40,8 +40,8 @@ private void UpdateDownloadFilesAction() { CustomLogger.Information($"UpdateDownloadFiles: Loading Organisations"); // IMPORTANT: This variable isn't used, but running this query makes the next query much faster - List activeOrganisations = dataRepository.GetAll() - .Where(o => o.Status == OrganisationStatuses.Active) + List nonDeletedOrganisations = dataRepository.GetAll() + .Where(o => o.Status != OrganisationStatuses.Deleted) .Include(o => o.OrganisationNames) .Include(o => o.OrganisationAddresses) .Include(o => o.OrganisationSicCodes) @@ -49,7 +49,7 @@ private void UpdateDownloadFilesAction() CustomLogger.Information($"UpdateDownloadFiles: Loading Returns"); List allReturns = dataRepository.GetAll() - .Where(r => r.Organisation.Status == OrganisationStatuses.Active) + .Where(r => r.Organisation.Status != OrganisationStatuses.Deleted) .Include(r => r.Organisation) .ToList();