aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_web/search.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/fatcat_web/search.py b/python/fatcat_web/search.py
index 913d6696..f85f6c89 100644
--- a/python/fatcat_web/search.py
+++ b/python/fatcat_web/search.py
@@ -636,7 +636,8 @@ def get_elastic_preservation_by_year(query: ReleaseQuery) -> List[Dict[str, Any]
"biblio",
],
)
- search = search.filter("term", container_id=query.container_id)
+ if query.container_id:
+ search = search.filter("term", container_id=query.container_id)
if query.exclude_stubs:
search = search.query(
"bool",