Browse Source

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.
merge-requests/57/head
Deimos 6 years ago
parent
commit
bd47a257e5
  1. 2
      tildes/tildes/views/topic.py

2
tildes/tildes/views/topic.py

@ -184,7 +184,7 @@ def get_group_topics(
@view_config(route_name="search", renderer="search.jinja2") @view_config(route_name="search", renderer="search.jinja2")
@use_kwargs(TopicListingSchema(only=("after", "before", "order", "per_page", "period"))) @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( def get_search(
request: Request, request: Request,
order: Any, order: Any,

Loading…
Cancel
Save