This commit is contained in:
Aevann1 2021-08-14 23:49:33 +02:00
parent 0c62bb0cda
commit e3b0d343db

View file

@ -61,7 +61,7 @@ def image_posts_listing(v):
page = int(request.args.get('page', 1))
posts = g.db.query(Submission).options(lazyload('*')).order_by(Submission.id.desc())
posts = g.db.query(Submission).order_by(Submission.id.desc())
firstrange = 25 * (page - 1)
secondrange = firstrange+26
@ -77,7 +77,7 @@ def image_posts_listing(v):
def flagged_comments(v):
page = max(1, int(request.args.get("page", 1)))
comments = g.db.query(Comment).options(lazyload('*')).filter_by(is_approved=0, is_banned=False).order_by(Comment.id.desc())
comments = g.db.query(Comment).filter_by(is_approved=0, is_banned=False).order_by(Comment.id.desc())
comments = [c for c in comments if c.active_flags > 0]
firstrange = 25 * (page - 1)