gfgf
This commit is contained in:
parent
b3f99a6a5f
commit
90fc4fb99d
1 changed files with 5 additions and 6 deletions
|
@ -25,27 +25,26 @@ def admin_vote_info_get(v):
|
||||||
ups = g.db.query(Vote
|
ups = g.db.query(Vote
|
||||||
).options(joinedload(Vote.user)
|
).options(joinedload(Vote.user)
|
||||||
).filter_by(submission_id=thing.id, vote_type=1
|
).filter_by(submission_id=thing.id, vote_type=1
|
||||||
).all()
|
).order_by(Vote.id).all()
|
||||||
|
|
||||||
downs = g.db.query(Vote
|
downs = g.db.query(Vote
|
||||||
).options(joinedload(Vote.user)
|
).options(joinedload(Vote.user)
|
||||||
).filter_by(submission_id=thing.id, vote_type=-1
|
).filter_by(submission_id=thing.id, vote_type=-1
|
||||||
).all()
|
).order_by(Vote.id).all()
|
||||||
|
|
||||||
elif isinstance(thing, Comment):
|
elif isinstance(thing, Comment):
|
||||||
|
|
||||||
ups = g.db.query(CommentVote
|
ups = g.db.query(CommentVote
|
||||||
).options(joinedload(CommentVote.user)
|
).options(joinedload(CommentVote.user)
|
||||||
).filter_by(comment_id=thing.id, vote_type=1
|
).filter_by(comment_id=thing.id, vote_type=1
|
||||||
).all()
|
).order_by(CommentVote.id).all()
|
||||||
|
|
||||||
downs = g.db.query(CommentVote
|
downs = g.db.query(CommentVote
|
||||||
).options(joinedload(CommentVote.user)
|
).options(joinedload(CommentVote.user)
|
||||||
).filter_by(comment_id=thing.id, vote_type=-1
|
).filter_by(comment_id=thing.id, vote_type=-1
|
||||||
).all()
|
).order_by(CommentVote.id).all()
|
||||||
|
|
||||||
else:
|
else: abort(400)
|
||||||
abort(400)
|
|
||||||
|
|
||||||
return render_template("votes.html",
|
return render_template("votes.html",
|
||||||
v=v,
|
v=v,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue