Skip to content

Commit

Permalink
EHD-1033: Include Retired organisations in data download
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgriff committed Mar 26, 2024
1 parent 246f565 commit bac61eb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ 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<Organisation> activeOrganisations = dataRepository.GetAll<Organisation>()
.Where(o => o.Status == OrganisationStatuses.Active)
List<Organisation> nonDeletedOrganisations = dataRepository.GetAll<Organisation>()
.Where(o => o.Status != OrganisationStatuses.Deleted)
.Include(o => o.OrganisationNames)
.Include(o => o.OrganisationAddresses)
.Include(o => o.OrganisationSicCodes)
.ToList();

CustomLogger.Information($"UpdateDownloadFiles: Loading Returns");
List<Return> allReturns = dataRepository.GetAll<Return>()
.Where(r => r.Organisation.Status == OrganisationStatuses.Active)
.Where(r => r.Organisation.Status != OrganisationStatuses.Deleted)
.Include(r => r.Organisation)
.ToList();

Expand Down

0 comments on commit bac61eb

Please sign in to comment.