diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2020-04-25 02:15:17 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2020-04-29 13:58:05 +0200 |
commit | 744fd47534b7e2bd463cfe0843f4bc5fcad8d474 (patch) | |
tree | b1bb25716ca3bab348aecb4f1cdc1eb1b8e41cea /python/fatcat_web | |
parent | 9b4d87a4e20e97fa40c0a4ff37d459628f1978b2 (diff) | |
download | fatcat-744fd47534b7e2bd463cfe0843f4bc5fcad8d474.tar.gz fatcat-744fd47534b7e2bd463cfe0843f4bc5fcad8d474.zip |
search: assume * when q is not set or empty
An example would be a blank search from a container details page.
Diffstat (limited to 'python/fatcat_web')
-rw-r--r-- | python/fatcat_web/routes.py | 4 |
1 files changed, 4 insertions, 0 deletions
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 |