From 9ab1890ffea99fa829b603b5a402c2452844b98c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 7 May 2019 18:45:35 -0700 Subject: handle null abstracts for release --- python/fatcat_tools/transforms/elasticsearch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/fatcat_tools/transforms') diff --git a/python/fatcat_tools/transforms/elasticsearch.py b/python/fatcat_tools/transforms/elasticsearch.py index 1d221ebc..73ac046e 100644 --- a/python/fatcat_tools/transforms/elasticsearch.py +++ b/python/fatcat_tools/transforms/elasticsearch.py @@ -78,7 +78,7 @@ def release_to_elasticsearch(entity, force_bool=True): if release_year: t['release_year'] = release_year - t['any_abstract'] = len(release.abstracts) > 0 + t['any_abstract'] = len(release.abstracts or []) > 0 t['ref_count'] = len(release.refs or []) t['contrib_count'] = len(release.contribs or []) contrib_names = [] -- cgit v1.2.3