aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_covid19/transform.py
diff options
context:
space:
mode:
Diffstat (limited to 'fatcat_covid19/transform.py')
-rw-r--r--fatcat_covid19/transform.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/fatcat_covid19/transform.py b/fatcat_covid19/transform.py
index c31c9f4..16774ab 100644
--- a/fatcat_covid19/transform.py
+++ b/fatcat_covid19/transform.py
@@ -68,7 +68,8 @@ def fulltext_to_elasticsearch(row, force_bool=True):
if release.get('abstracts'):
for a in release['abstracts']:
abstracts.append(a['content'])
- abstract_langs.append(a['lang'])
+ if a.get('lang'):
+ abstract_langs.append(a['lang'])
contrib_names = []
contrib_affiliations = []
@@ -199,6 +200,6 @@ def transform_es_file(json_input, json_output):
"""
for l in json_input:
l = json.loads(l)
- result = fulltext_to_elasticsearch(l, args)
+ result = fulltext_to_elasticsearch(l)
if result:
print(json.dumps(result, sort_keys=True), file=json_output)