Merge pull request #1381 from CTFd/fix-submission-type-pagination

* Fix `url_for` call for Admin Panel submission pagination
fix-invalid-session-situation
Kevin Chung 2020-05-05 17:44:25 -04:00 committed by GitHub
commit 55d96b1c1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -54,10 +54,16 @@ def submissions_listing(submission_type):
"admin/submissions.html", "admin/submissions.html",
submissions=submissions, submissions=submissions,
prev_page=url_for( 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( 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, type=submission_type,
q=q, q=q,