diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-05-07 18:45:35 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-05-07 18:45:35 -0700 |
commit | 9ab1890ffea99fa829b603b5a402c2452844b98c (patch) | |
tree | 2ba256157cae53db861d99ef0f42a938851f2d66 | |
parent | be79fb3c3d15bedd6f7ec5250116175a89f37622 (diff) | |
download | fatcat-9ab1890ffea99fa829b603b5a402c2452844b98c.tar.gz fatcat-9ab1890ffea99fa829b603b5a402c2452844b98c.zip |
handle null abstracts for release
-rw-r--r-- | python/fatcat_tools/transforms/elasticsearch.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 = [] |