We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b20bac5 commit 576395fCopy full SHA for 576395f
1 file changed
rating_api/routes/comment.py
@@ -387,7 +387,7 @@ async def like_comment(
387
)
388
.first()
389
390
- comment = CommentGet.model_validate(comment)
+
391
comment.is_liked = (reaction == Reaction.LIKE)
392
comment.is_disliked = (reaction == Reaction.DISLIKE)
393
@@ -399,4 +399,4 @@ async def like_comment(
399
comment.is_disliked = False
400
comment.is_liked = False
401
CommentReaction.delete(session=db.session, id=existing_reaction.uuid)
402
- return comment
+ return CommentGet.model_validate(comment)
0 commit comments