summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-06-29 22:23:39 -0700
committerBryan Newbold <bnewbold@archive.org>2020-06-29 22:23:39 -0700
commitf2d98ae0fa3f1afa846ba9df593cda7338b42725 (patch)
treef95686cbeaadce356ea94732f657d3dbfd3d772c
parent16e5f6d279c34856d542da98b042145c8995064f (diff)
downloadfatcat-scholar-f2d98ae0fa3f1afa846ba9df593cda7338b42725.tar.gz
fatcat-scholar-f2d98ae0fa3f1afa846ba9df593cda7338b42725.zip
fix search filter bug (papers is default)
-rw-r--r--fatcat_scholar/search.py4
1 files 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(