Skip to content

Commit

Permalink
[Class statistics] Fix syntax error in SQL query caused by casing inc…
Browse files Browse the repository at this point in the history
…onsistencies
  • Loading branch information
valtterikantanen committed Nov 6, 2024
1 parent 7fc06a5 commit 361d5da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/backend/src/services/populations/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,11 @@ export const formatStudentsForApi = async (
const getSubstitutions = async (codes: string[]) => {
const courses = await Course.findAll({
attributes: ['code', 'substitutions'],
where: { code: codes },
where: {
code: {
[Op.iLike]: { [Op.any]: codes },
},
},
raw: true,
})

Expand Down

0 comments on commit 361d5da

Please sign in to comment.