diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-05-21 19:59:46 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-05-21 19:59:46 -0700 |
commit | 6330b8184b2c6cf7dd08144873759a56e705928c (patch) | |
tree | ced7c5e8f02a85ab89775c2aa1dca690138101cf | |
parent | 55bb09006e984da217cbfdf4145aaad16b0b5cac (diff) | |
download | fatcat-scholar-6330b8184b2c6cf7dd08144873759a56e705928c.tar.gz fatcat-scholar-6330b8184b2c6cf7dd08144873759a56e705928c.zip |
make mypy happy
-rw-r--r-- | fatcat_scholar/search.py | 2 |
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 = "*" |