Skip to content

Commit db25329

Browse files
authored
Add sorting by create_ts
1 parent e107fd8 commit db25329

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

rating_api/routes/comment.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ async def get_comments(
182182
result.comments.sort(key=lambda comment: comment.create_ts, reverse=True)
183183
result.total = len(result.comments)
184184
result.comments = [CommentGet.model_validate(comment) for comment in result.comments]
185+
result.comments.sort(key=lambda comment: comment.create_ts, reverse=True)
185186
return result
186187

187188

0 commit comments

Comments
 (0)