diff --git a/api/src/main/java/ca/bc/gov/educ/api/distribution/process/YearEndMergeProcess.java b/api/src/main/java/ca/bc/gov/educ/api/distribution/process/YearEndMergeProcess.java index 5116cae..8712e2e 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/distribution/process/YearEndMergeProcess.java +++ b/api/src/main/java/ca/bc/gov/educ/api/distribution/process/YearEndMergeProcess.java @@ -41,12 +41,14 @@ public ProcessorData fire(ProcessorData processorData) { int numberOfCreatedSchoolLabelReports = 0; List schoolsForLabels = new ArrayList<>(); List districtsForLabels = new ArrayList<>(); + List processedSchools = new ArrayList<>(); for (String mincode : mapDist.keySet()) { DistributionPrintRequest distributionPrintRequest = mapDist.get(mincode); CommonSchool commonSchool = getBaseSchoolDetails(distributionPrintRequest, searchRequest, mincode, exception); if (commonSchool != null) { int currentSlipCount = 0; schoolCounter++; + processedSchools.add(mincode); String schoolCategoryCode = commonSchool.getSchoolCategoryCode(); logger.debug("*** School Details Acquired {} category {}", mincode, schoolCategoryCode); @@ -144,7 +146,7 @@ public ProcessorData fire(ProcessorData processorData) { response.getSchools().addAll(schoolsForLabels); response.getDistricts().addAll(districtsForLabels); response.setStudentSearchRequest(searchRequest); - response.getDistrictSchools().addAll(mapDist.keySet()); + response.getDistrictSchools().addAll(processedSchools); processorData.setDistributionResponse(response); return processorData; }