Skip to content

Commit

Permalink
Hotfix for formatting issue of preferences (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisJordan authored Aug 12, 2024
1 parent 2dd2307 commit 3d95d9b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions backend/services/academics/hiring.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,10 @@ def get_phd_applicants(
.where(section_application_table.c.application_id.in_(application_ids))
.order_by(section_application_table.c.preference)
)
for idx, section_application in enumerate(
self._session.execute(section_application_query)
):
for section_application in self._session.execute(section_application_query):
_, section_id, application_id = section_application
phd_applications[application_id].student_preferences.append(
f"{idx}. {sections[section_id].course_id}.{sections[section_id].number}"
f"{sections[section_id].course_id}.{sections[section_id].number}"
)

# Grab instructor preferences of applications
Expand All @@ -246,9 +244,9 @@ def get_phd_applicants(
)
)
instructor_preferences = self._session.scalars(instructor_review_query).all()
for idx, review in enumerate(instructor_preferences):
for review in instructor_preferences:
phd_applications[review.application_id].instructor_preferences.append(
f"{idx}. {review.course_site.sections[0].course_id}.{review.course_site.sections[0].number}"
f"{review.course_site.sections[0].course_id}.{review.course_site.sections[0].number}"
)

return list(phd_applications.values())
Expand Down

0 comments on commit 3d95d9b

Please sign in to comment.