Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Temmmmmo authored Oct 29, 2024
1 parent 8d01462 commit 13c9249
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rating_api/routes/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ async def get_comments(
comments = Comment.query(session=db.session).all()
if not comments:
raise ObjectNotFound(Comment, 'all')
result = CommentGetAll(limit=limit, offset=offset, total=len(comments), comments=comments)
result = CommentGetAll(limit=limit, offset=offset, total=len(comments))
result.comments = comments
if lecturer_id:
result.comments = [comment for comment in result.comments if comment.lecturer_id == lecturer_id]
if unreviewed:
Expand Down

0 comments on commit 13c9249

Please sign in to comment.