aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin@archive.org>2020-04-29 20:46:53 +0000
committerMartin Czygan <martin@archive.org>2020-04-29 20:46:53 +0000
commit228a9245ea3680e11164f58367310406402d306b (patch)
treef4ec3c90cde1de9c48281412ee50b75b368efaa9
parent05878da547dc959a2ae70fbb8d55f7a59e66a3f4 (diff)
parent744fd47534b7e2bd463cfe0843f4bc5fcad8d474 (diff)
downloadfatcat-228a9245ea3680e11164f58367310406402d306b.tar.gz
fatcat-228a9245ea3680e11164f58367310406402d306b.zip
Merge branch 'martin-fix-container-empty-search' into 'master'
search: assume * when q is not set or empty See merge request webgroup/fatcat!51
-rw-r--r--python/fatcat_web/routes.py4
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