mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
path_with_added_args now preserves order in Python 3.5
This commit is contained in:
parent
eaf715a60a
commit
2b79f2bdeb
2 changed files with 9 additions and 7 deletions
|
|
@ -151,10 +151,9 @@ def path_with_added_args(request, args, path=None):
|
|||
args = args.items()
|
||||
arg_keys = set(a[0] for a in args)
|
||||
current = []
|
||||
for key, values in request.args.items():
|
||||
current.extend(
|
||||
[(key, value) for value in values if key not in arg_keys]
|
||||
)
|
||||
for key, value in urllib.parse.parse_qsl(request.query_string):
|
||||
if key not in arg_keys:
|
||||
current.append((key, value))
|
||||
current.extend([
|
||||
(key, value)
|
||||
for key, value in args
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue