From 1f167e37af1e4d9a2a8383f1fbc682605dbede3f Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:00:12 +1300 Subject: [PATCH] domain block and ban - bugfixes --- app/domain/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/domain/routes.py b/app/domain/routes.py index da44766f..a573f650 100644 --- a/app/domain/routes.py +++ b/app/domain/routes.py @@ -28,8 +28,8 @@ def show_domain(domain_id): posts = Post.query.join(Community).filter(Post.domain_id == domain.id, Community.banned == False).order_by(desc(Post.posted_at)) # pagination posts = posts.paginate(page=page, per_page=100, error_out=False) - next_url = url_for('domain.show_domain', page=posts.next_num) if posts.has_next else None - prev_url = url_for('domain.show_domain', page=posts.prev_num) if posts.has_prev and page != 1 else None + next_url = url_for('domain.show_domain', domain_id=domain_id, page=posts.next_num) if posts.has_next else None + prev_url = url_for('domain.show_domain', domain_id=domain_id, page=posts.prev_num) if posts.has_prev and page != 1 else None return render_template('domain/domain.html', domain=domain, title=domain.name, posts=posts, POST_TYPE_IMAGE=constants.POST_TYPE_IMAGE, POST_TYPE_LINK=constants.POST_TYPE_LINK, next_url=next_url, prev_url=prev_url)