Skip to content

Commit

Permalink
Don't duplicate _sort_desc, refs #1738
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Aug 14, 2022
1 parent 080d4b3 commit 1563c22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion datasette/views/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ async def extra_template():
for key in request.args:
if (
key.startswith("_")
and key not in ("_sort", "_search", "_next")
and key not in ("_sort", "_sort_desc", "_search", "_next")
and "__" not in key
):
for value in request.args.getlist(key):
Expand Down
1 change: 1 addition & 0 deletions tests/test_table_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,7 @@ def test_other_hidden_form_fields(app_client, path, expected_hidden):
[
("/fixtures/searchable?_search=terry", []),
("/fixtures/searchable?_sort=text2", []),
("/fixtures/searchable?_sort_desc=text2", []),
("/fixtures/searchable?_sort=text2&_where=1", [("_where", "1")]),
],
)
Expand Down

0 comments on commit 1563c22

Please sign in to comment.