Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SKEDGE-16 #comment Patch for single professor with middle name for courses which do not exist on Nebula API #29

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/data/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function buildProfessorProfiles (payload: ShowCourseTabPayload) {
return fetchNebulaProfessor({ firstName: firstName, lastName: lastName})
}))
const nebulaSections = await Promise.all(nebulaProfessors.map(professor => {
if (professor?._id === undefined) return null
if (professor?._id === undefined || !nebulaCourse) return null
return fetchNebulaSections({ courseReference: nebulaCourse._id, professorReference: professor._id })
}))
const rmps = await requestProfessorsFromRmp({ professorNames: professors.map(prof => prof.split(' ')[0] + " " + prof.split(' ').at(-1)), schoolId: SCHOOL_ID })
Expand Down