Skip to content

Commit

Permalink
fix grade filter validation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmcdermid committed Sep 13, 2024
1 parent 08fafff commit 99a449a
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 99a449a

Please sign in to comment.