We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 635e7a4 commit 42ed81eCopy full SHA for 42ed81e
rating_api/routes/lecturer.py
@@ -59,7 +59,7 @@ async def get_lecturer(id: int, info: list[Literal["comments", "mark"]] = Query(
59
if comment.review_status is ReviewStatus.APPROVED
60
]
61
if "comments" in info and approved_comments:
62
- result.comments = approved_comments
+ result.comments = sorted(approved_comments, key=lambda comment: comment.create_ts, reverse=True)
63
if "mark" in info and approved_comments:
64
result.mark_freebie = sum(comment.mark_freebie for comment in approved_comments) / len(approved_comments)
65
result.mark_kindness = sum(comment.mark_kindness for comment in approved_comments) / len(approved_comments)
0 commit comments