From bd47a257e5827dd3e80b829c220c434b870404aa Mon Sep 17 00:00:00 2001 From: Deimos Date: Sun, 17 Feb 2019 15:48:45 -0700 Subject: [PATCH] Fix crash from visiting search page directly The site would throw an internal server error if you went to "/search" and there was no q= param set. --- tildes/tildes/views/topic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tildes/tildes/views/topic.py b/tildes/tildes/views/topic.py index 785825e..adcef02 100644 --- a/tildes/tildes/views/topic.py +++ b/tildes/tildes/views/topic.py @@ -184,7 +184,7 @@ def get_group_topics( @view_config(route_name="search", renderer="search.jinja2") @use_kwargs(TopicListingSchema(only=("after", "before", "order", "per_page", "period"))) -@use_kwargs({"search": String(load_from="q")}) +@use_kwargs({"search": String(load_from="q", missing="")}) def get_search( request: Request, order: Any,