Skip to content

Commit

Permalink
Fix wrong query string in paging buttons (Nitrate#731)
Browse files Browse the repository at this point in the history
In advanced search result page, query arguments are removed incorrectly,
that causes error when clicking a paging button.

Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
  • Loading branch information
tkdchen committed Aug 14, 2020
1 parent 6df366e commit 132a0af
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/tcms/search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,18 +182,9 @@ def remove_from_request_path(request, names: List[str]):
)
return '?' + urlencode({
name: value for name, value in parse_qsl(url_info.query)
if name in names
if name not in names
})

# path = path.split('?')
# if len(path) > 1:
# path = path[1].split('&')
# else:
# return None
# path = [p for p in path if not p.startswith(name)]
# path = '&'.join(path)
# return '?' + path


def fmt_errors(form_errors):
"""
Expand Down

0 comments on commit 132a0af

Please sign in to comment.