From 744fd47534b7e2bd463cfe0843f4bc5fcad8d474 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Sat, 25 Apr 2020 02:15:17 +0200 Subject: search: assume * when q is not set or empty An example would be a blank search from a container details page. --- python/fatcat_web/routes.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'python/fatcat_web') diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index 8583d255..58f4b7e0 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -707,6 +707,8 @@ def generic_search(): def release_search(): query = request.args.get('q') + if not query: + query = '*' fulltext_only = bool(request.args.get('fulltext_only')) issnl = request.args.get('container_issnl') @@ -731,6 +733,8 @@ def release_search(): def container_search(): query = request.args.get('q') + if not query: + query = '*' offset = request.args.get('offset', '0') offset = max(0, int(offset)) if offset.isnumeric() else 0 -- cgit v1.2.3