From 7035c31279eef50645ba9eb9155013bf558aefd1 Mon Sep 17 00:00:00 2001 From: Mark Youngman Date: Tue, 31 Dec 2024 12:05:16 +0000 Subject: [PATCH] EES-5740 Changes in response to PR comments --- .../Services/DataImportService.cs | 3 ++- .../Meta/SubjectMetaViewModel.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GovUk.Education.ExploreEducationStatistics.Data.Processor/Services/DataImportService.cs b/src/GovUk.Education.ExploreEducationStatistics.Data.Processor/Services/DataImportService.cs index 3d7c037dd1..a0709354c8 100644 --- a/src/GovUk.Education.ExploreEducationStatistics.Data.Processor/Services/DataImportService.cs +++ b/src/GovUk.Education.ExploreEducationStatistics.Data.Processor/Services/DataImportService.cs @@ -275,7 +275,8 @@ private static async Task GenerateFilterHierarchy( var childFilter = filters .Single(f => f.GroupCsvColumn == parentFilter.ColumnName); - while (true) // one iteration of loop per tier + // Loop over each parent/child or tier, starting with the root filter, until no child is found + while (true) { var currentParentFilterId = parentFilter.Id; // avoid closure madness var currentChildFilterId = childFilter.Id; diff --git a/src/GovUk.Education.ExploreEducationStatistics.Data.ViewModels/Meta/SubjectMetaViewModel.cs b/src/GovUk.Education.ExploreEducationStatistics.Data.ViewModels/Meta/SubjectMetaViewModel.cs index 7b4bbbcec7..c322b952c2 100644 --- a/src/GovUk.Education.ExploreEducationStatistics.Data.ViewModels/Meta/SubjectMetaViewModel.cs +++ b/src/GovUk.Education.ExploreEducationStatistics.Data.ViewModels/Meta/SubjectMetaViewModel.cs @@ -12,5 +12,5 @@ public record SubjectMetaViewModel public TimePeriodsMetaViewModel TimePeriod { get; set; } = new(); - public List? FilterHierarchies { get; set; } = null; + public List? FilterHierarchies { get; set; } }