aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/search.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-05-21 19:59:46 -0700
committerBryan Newbold <bnewbold@archive.org>2020-05-21 19:59:46 -0700
commit6330b8184b2c6cf7dd08144873759a56e705928c (patch)
treeced7c5e8f02a85ab89775c2aa1dca690138101cf /fatcat_scholar/search.py
parent55bb09006e984da217cbfdf4145aaad16b0b5cac (diff)
downloadfatcat-scholar-6330b8184b2c6cf7dd08144873759a56e705928c.tar.gz
fatcat-scholar-6330b8184b2c6cf7dd08144873759a56e705928c.zip
make mypy happy
Diffstat (limited to 'fatcat_scholar/search.py')
-rw-r--r--fatcat_scholar/search.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/fatcat_scholar/search.py b/fatcat_scholar/search.py
index c78b10c..d899711 100644
--- a/fatcat_scholar/search.py
+++ b/fatcat_scholar/search.py
@@ -86,7 +86,7 @@ def do_fulltext_search(query: FulltextQuery, deep_page_limit: int = 2000) -> Ful
search = Search(using=es_client, index=settings.ELASTICSEARCH_FULLTEXT_INDEX)
# Convert raw DOIs to DOI queries
- if len(query.q.split()) == 1 and query.q.startswith("10.") and query.q.count("/") >= 1:
+ if query.q and len(query.q.split()) == 1 and query.q.startswith("10.") and query.q.count("/") >= 1:
search = search.filter("terms", doi=query.q)
query.q = "*"