Skip to content

Commit 576395f

Browse files
committed
fixed bug with number of likes/dislikes
1 parent b20bac5 commit 576395f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rating_api/routes/comment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ async def like_comment(
387387
)
388388
.first()
389389
)
390-
comment = CommentGet.model_validate(comment)
390+
391391
comment.is_liked = (reaction == Reaction.LIKE)
392392
comment.is_disliked = (reaction == Reaction.DISLIKE)
393393

@@ -399,4 +399,4 @@ async def like_comment(
399399
comment.is_disliked = False
400400
comment.is_liked = False
401401
CommentReaction.delete(session=db.session, id=existing_reaction.uuid)
402-
return comment
402+
return CommentGet.model_validate(comment)

0 commit comments

Comments
 (0)