forked from rDrama/rDrama
dont reveal votes on polls in ghost threads
parent
2945ee844d
commit
09da483bac
|
@ -47,6 +47,8 @@ def option_votes(option_id, v):
|
||||||
|
|
||||||
if not option: abort(404)
|
if not option: abort(404)
|
||||||
|
|
||||||
|
if option.post.ghost: abort(403)
|
||||||
|
|
||||||
ups = g.db.query(SubmissionOptionVote).filter_by(option_id=option_id).order_by(SubmissionOptionVote.created_utc).all()
|
ups = g.db.query(SubmissionOptionVote).filter_by(option_id=option_id).order_by(SubmissionOptionVote.created_utc).all()
|
||||||
|
|
||||||
return render_template("poll_votes.html",
|
return render_template("poll_votes.html",
|
||||||
|
@ -97,6 +99,8 @@ def option_votes_comment(option_id, v):
|
||||||
|
|
||||||
if not option: abort(404)
|
if not option: abort(404)
|
||||||
|
|
||||||
|
if option.comment.ghost: abort(403)
|
||||||
|
|
||||||
ups = g.db.query(CommentOptionVote).filter_by(option_id=option_id).order_by(CommentOptionVote.created_utc).all()
|
ups = g.db.query(CommentOptionVote).filter_by(option_id=option_id).order_by(CommentOptionVote.created_utc).all()
|
||||||
|
|
||||||
return render_template("poll_votes.html",
|
return render_template("poll_votes.html",
|
||||||
|
|
Loading…
Reference in New Issue