From 5591d7d574870326a62d286542ff1ff70bafd9dd Mon Sep 17 00:00:00 2001 From: justcool393 Date: Tue, 11 Oct 2022 22:27:27 -0700 Subject: [PATCH] fix real votes --- files/routes/votes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/files/routes/votes.py b/files/routes/votes.py index 94885cfac..373245393 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -125,7 +125,10 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): votes = votes.filter_by(vote_type=dir) if real_instead_of_dir: votes = votes.filter_by(real=True) - elif vote_cls == Vote: + else: + votes = votes.filter_by(vote_type=dir) + + if vote_cls == Vote: votes = votes.filter_by(submission_id=target.id) elif vote_cls == CommentVote: votes = votes.filter_by(comment_id=target.id)