fix /reported/posts having much less than PAGE_SIZE

pull/222/head
Aevann 2024-02-03 05:01:58 +02:00
parent 132bc76dc2
commit 5e1df64b69
1 changed files with 2 additions and 2 deletions

View File

@ -335,7 +335,7 @@ def image_posts_listing(v):
def reported_posts(v):
page = get_page()
listing = g.db.query(Post).options(load_only(Post.id)).filter_by(
listing = g.db.query(Post).distinct(Post.id).options(load_only(Post.id)).filter_by(
is_approved=None,
is_banned=False,
deleted_utc=0
@ -358,7 +358,7 @@ def reported_posts(v):
def reported_comments(v):
page = get_page()
listing = g.db.query(Comment).options(load_only(Comment.id)).filter_by(
listing = g.db.query(Comment).distinct(Comment.id).options(load_only(Comment.id)).filter_by(
is_approved=None,
is_banned=False,
deleted_utc=0