diff --git a/apps/backend/src/modules/course/controller.ts b/apps/backend/src/modules/course/controller.ts index 470261a25..b02a0bc24 100644 --- a/apps/backend/src/modules/course/controller.ts +++ b/apps/backend/src/modules/course/controller.ts @@ -22,8 +22,8 @@ export const getClassesByCourse = async ( courseNumber: string ) => { const classes = await ClassModel.find({ - "subjectArea.code": subjectArea, - "catalogNumber.formatted": courseNumber, + "course.subjectArea.code": subjectArea, + "course.catalogNumber.formatted": courseNumber, }).lean(); return classes.map(formatClass);