From f2d98ae0fa3f1afa846ba9df593cda7338b42725 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 29 Jun 2020 22:23:39 -0700 Subject: fix search filter bug (papers is default) --- fatcat_scholar/search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fatcat_scholar/search.py b/fatcat_scholar/search.py index 0985081..8fbdae0 100644 --- a/fatcat_scholar/search.py +++ b/fatcat_scholar/search.py @@ -102,7 +102,7 @@ def do_fulltext_search( query.q = "*" # type filters - if query.filter_type == "papers": + if query.filter_type == "papers" or query.filter_type is None: search = search.filter( "terms", type=["article-journal", "paper-conference", "chapter",] ) @@ -110,7 +110,7 @@ def do_fulltext_search( search = search.filter("terms", type=["report", "standard",]) elif query.filter_type == "datasets": search = search.filter("terms", type=["dataset", "software",]) - elif query.filter_type == "everything" or query.filter_type is None: + elif query.filter_type == "everything": pass else: raise ValueError( -- cgit v1.2.3