forked from rDrama/rDrama
fix this https://stupidpol.site/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/3276699
parent
4b5de48618
commit
fe6fe68e3c
|
@ -20,7 +20,11 @@ def vote_info_get(v, link):
|
||||||
if (thing.author.shadowbanned
|
if (thing.author.shadowbanned
|
||||||
and not (v and v.admin_level >= PERMS['USER_SHADOWBAN'])):
|
and not (v and v.admin_level >= PERMS['USER_SHADOWBAN'])):
|
||||||
thing_id = g.db.query(Submission.id) \
|
thing_id = g.db.query(Submission.id) \
|
||||||
.filter_by(upvotes=thing.upvotes, downvotes=thing.downvotes) \
|
.filter(
|
||||||
|
Submission.upvotes == thing.upvotes,
|
||||||
|
Submission.downvotes == thing.downvotes,
|
||||||
|
Submission.created_utc >= thing.created_utc,
|
||||||
|
) \
|
||||||
.order_by(Submission.id).first()[0]
|
.order_by(Submission.id).first()[0]
|
||||||
else: thing_id = thing.id
|
else: thing_id = thing.id
|
||||||
|
|
||||||
|
@ -38,7 +42,11 @@ def vote_info_get(v, link):
|
||||||
if (thing.author.shadowbanned
|
if (thing.author.shadowbanned
|
||||||
and not (v and v.admin_level >= PERMS['USER_SHADOWBAN'])):
|
and not (v and v.admin_level >= PERMS['USER_SHADOWBAN'])):
|
||||||
thing_id = g.db.query(Comment.id) \
|
thing_id = g.db.query(Comment.id) \
|
||||||
.filter_by(upvotes=thing.upvotes, downvotes=thing.downvotes) \
|
.filter(
|
||||||
|
Comment.upvotes == thing.upvotes,
|
||||||
|
Comment.downvotes == thing.downvotes,
|
||||||
|
Comment.created_utc >= thing.created_utc,
|
||||||
|
) \
|
||||||
.order_by(Comment.id).first()[0]
|
.order_by(Comment.id).first()[0]
|
||||||
else: thing_id = thing.id
|
else: thing_id = thing.id
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue