From 6330b8184b2c6cf7dd08144873759a56e705928c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 21 May 2020 19:59:46 -0700 Subject: make mypy happy --- fatcat_scholar/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fatcat_scholar') 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 = "*" -- cgit v1.2.3