Open Awesome-E opened 8 months ago
Optional chaining operator was added for course subreviews after the api migration. I messed with this in #433 and added optional chaining to the professor subreviews as well since that seemed to have been missed and was throwing errors. Errors for this issue are now prevented but we still have the issue of there being a missing professor or possibly course name (have not seen the latter yet, but plently of the former exists in our dev db).
ics 46 example:
We should ask PPAPI how they handle when courses are no longer offered and professors leave. Some professors who have still left are still searchable on PeterPortal (e.g. Pattis, Carey). Some are not searchable.
e.g. Burtsev who taught 143A (review from staging instance)
From there, we can figure out how to approach this.
Reproduce:
Expected: sub-reviews load correctly Actual: Sub-reviews don't load
instructor_history
matches the professorID, so reading itsname
throws an error (cannot readname
of undefined ininstructor_history
)We should either make sure the professor is in the instructor history, handle this case, or (ideally) both.
https://github.com/icssc/peterportal-client/blob/4aeed3dd7454d9a97c5b6689b29fb0a335b0d9da/site/src/component/Review/SubReview.tsx#L93-L95