diff --git a/judgments/views/advanced_search.py b/judgments/views/advanced_search.py index 340a759ee..75a68730f 100644 --- a/judgments/views/advanced_search.py +++ b/judgments/views/advanced_search.py @@ -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"), diff --git a/judgments/views/results.py b/judgments/views/results.py index 5f5b87608..ce582d284 100644 --- a/judgments/views/results.py +++ b/judgments/views/results.py @@ -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(