try to fix 500 error in WPD

master
Aevann1 2022-08-26 16:57:14 +02:00
parent 4d657a03ad
commit f92a83724b
1 changed files with 1 additions and 1 deletions

View File

@ -202,7 +202,7 @@ def vote_comment(comment_id, new, v):
g.db.add(vote)
g.db.flush()
g.db.commit()
comment.upvotes = g.db.query(CommentVote).filter_by(comment_id=comment.id, vote_type=1).count()
comment.downvotes = g.db.query(CommentVote).filter_by(comment_id=comment.id, vote_type=-1).count()
comment.realupvotes = g.db.query(CommentVote).filter_by(comment_id=comment.id, real=True).count()