From 73e387524a148a413df910166aa3ac9023008a43 Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Tue, 5 May 2020 15:52:45 -0400 Subject: [PATCH 1/2] Fix url_for for admin panel submission pagination --- CTFd/admin/submissions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CTFd/admin/submissions.py b/CTFd/admin/submissions.py index 19e08e8..f0b7dc6 100644 --- a/CTFd/admin/submissions.py +++ b/CTFd/admin/submissions.py @@ -54,10 +54,10 @@ def submissions_listing(submission_type): "admin/submissions.html", submissions=submissions, prev_page=url_for( - request.endpoint, type=submission_type, page=submissions.prev_num, **args + request.endpoint, submission_type=submission_type, page=submissions.prev_num, **args ), next_page=url_for( - request.endpoint, type=submission_type, page=submissions.next_num, **args + request.endpoint, submission_type=submission_type, page=submissions.next_num, **args ), type=submission_type, q=q, From 197cfc3cf214fd4ecf3fd7d2d668599c1e36505a Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Tue, 5 May 2020 16:44:31 -0400 Subject: [PATCH 2/2] Run formatter --- CTFd/admin/submissions.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CTFd/admin/submissions.py b/CTFd/admin/submissions.py index f0b7dc6..5a2a5d1 100644 --- a/CTFd/admin/submissions.py +++ b/CTFd/admin/submissions.py @@ -54,10 +54,16 @@ def submissions_listing(submission_type): "admin/submissions.html", submissions=submissions, prev_page=url_for( - request.endpoint, submission_type=submission_type, page=submissions.prev_num, **args + request.endpoint, + submission_type=submission_type, + page=submissions.prev_num, + **args ), next_page=url_for( - request.endpoint, submission_type=submission_type, page=submissions.next_num, **args + request.endpoint, + submission_type=submission_type, + page=submissions.next_num, + **args ), type=submission_type, q=q,