Skip to content

Commit

Permalink
Merge pull request #2057 from bcgov/fix/EDX-2931
Browse files Browse the repository at this point in the history
fix grade filter validation
  • Loading branch information
mightycox authored Sep 13, 2024
2 parents 08fafff + 0985018 commit 02d8fea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/src/components/studentFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ function validateFteZeroFilter(filters) {
}

function validateGradeFilter(filterGrades = []) {
const activeGradeCodes = cacheService.getActiveEnrolledGradeCodes();
const activeGradeCodes = cacheService.getActiveEnrolledGradeCodes().map(grade => grade.enrolledGradeCode);
if (filterGrades.length > 0) {
if (!filterGrades.every(value => activeGradeCodes.includes(value))) {
log.error('Invalid grade filter.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export default {
const filterKey = this.indySchoolDistrictObject.type === 'indy' ? 'schoolNameNumber' : 'districtNameNumber';
this.filterSearchParams.schoolOrDistrictId = {key: filterKey, value: this.indySchoolDistrictObject.id};
if (this.indySchoolDistrictObject.type === 'district') {
sort = { sdcSchoolCollection: 'DESC' };
sort = { sdcSchoolCollection: 'ASC' };
}
}
ApiService.apiAxios.get(`${Routes.sdc.BASE_URL}/collection/${this.collectionObject.collectionID}/students-paginated-slice?tableFormat=true`, {
Expand Down

0 comments on commit 02d8fea

Please sign in to comment.