Skip to content

Commit

Permalink
sort subjects alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
Highfire1 committed Jun 4, 2024
1 parent 79e3967 commit f38f5f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async def semesters_all() -> list[str]:
async def courses() -> IndexCourseList:

with Session(controller.engine) as session:
statement = select(CourseSummaryDB.subject, CourseSummaryDB.course_code).distinct()
statement = select(CourseSummaryDB.subject, CourseSummaryDB.course_code).order_by(col(CourseSummaryDB.subject).asc()).distinct()
results = session.exec(statement)
result = results.all()

Expand Down

0 comments on commit f38f5f7

Please sign in to comment.