Skip to content

Commit

Permalink
Fix pagination args
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Jan 10, 2024
1 parent 181fe21 commit 2955958
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/lib/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def pagination_list(current_page, total_pages, boundaries=1, around=1):


def generate_new_page_query_string(args, page):
return f"?{urllib.parse.urlencode(args | {'page': page}, doseq=True)}"
args_dict = args.to_dict(flat=False) | {"page": page}
return f"?{urllib.parse.urlencode(args_dict, doseq=True)}"


def pagination_object(
Expand Down
2 changes: 1 addition & 1 deletion app/wagtail/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


@bp.route("/preview/")
def preview_page(key_prefix=cache_key_prefix):
def preview_page():
content_type = request.args.get("content_type")
token = request.args.get("token")
page_data = page_preview(content_type, token)
Expand Down

0 comments on commit 2955958

Please sign in to comment.