master
Aevann1 2021-08-14 23:53:23 +02:00
parent e020f9e82a
commit d5986097cb
1 changed files with 2 additions and 5 deletions

View File

@ -63,9 +63,7 @@ def flagged_posts(v):
posts = g.db.query(Submission).filter_by(
is_approved=0,
is_banned=False
).join(Submission.flags
).options(contains_eager(Submission.flags)
).order_by(Submission.id.desc()).offset(25 * (page - 1)).limit(26)
).join(Submission.flags).order_by(Submission.id.desc()).offset(25 * (page - 1)).limit(26)
listing = [p.id for p in posts]
next_exists = (len(listing) == 26)
@ -87,8 +85,7 @@ def flagged_comments(v):
).filter_by(
is_approved=0,
is_banned=False
).join(Comment.flags).options(contains_eager(Comment.flags)
).order_by(Comment.id.desc()).offset(25 * (page - 1)).limit(26).all()
).join(Comment.flags).order_by(Comment.id.desc()).offset(25 * (page - 1)).limit(26).all()
listing = [p.id for p in posts]
next_exists = (len(listing) == 26)