Skip to content

Commit

Permalink
Merge pull request #656 from nationalarchives/default-query-is-empty-…
Browse files Browse the repository at this point in the history
…string

Require query default value to be empty string, not None
  • Loading branch information
dragon-dxw authored Apr 25, 2023
2 parents 3b86627 + 6a63201 commit 8e98ea8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion judgments/views/advanced_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
def advanced_search(request):
params = request.GET
query_params = {
"query": params.get("query"),
"query": params.get("query", ""),
"court": params.getlist("court"),
"judge": params.get("judge"),
"party": params.get("party"),
Expand Down
2 changes: 1 addition & 1 deletion judgments/views/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def results(request):
context = {"page_title": gettext("results.search.title")}
try:
params = request.GET
query = preprocess_query(params.get("query"))
query = preprocess_query(params.get("query", ""))
page = str(as_integer(params.get("page"), minimum=1))
per_page = str(
as_integer(
Expand Down

0 comments on commit 8e98ea8

Please sign in to comment.