summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/transforms
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-02-26 11:28:05 -0800
committerBryan Newbold <bnewbold@robocracy.org>2020-02-26 11:29:30 -0800
commit4e6bc246d01183f4c7ffad7d0d474e683f04c07f (patch)
tree2820228c6544aad199b62722702c3c1678a99c0f /python/fatcat_tools/transforms
parent0450f22006c9b991cdc4695458fc3b3e3e97bfbb (diff)
downloadfatcat-4e6bc246d01183f4c7ffad7d0d474e683f04c07f.tar.gz
fatcat-4e6bc246d01183f4c7ffad7d0d474e683f04c07f.zip
ES container last tweaks
Diffstat (limited to 'python/fatcat_tools/transforms')
-rw-r--r--python/fatcat_tools/transforms/elasticsearch.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/fatcat_tools/transforms/elasticsearch.py b/python/fatcat_tools/transforms/elasticsearch.py
index cbafca7e..8581febd 100644
--- a/python/fatcat_tools/transforms/elasticsearch.py
+++ b/python/fatcat_tools/transforms/elasticsearch.py
@@ -342,6 +342,9 @@ def container_to_elasticsearch(entity, force_bool=True):
if entity.extra.get(key):
t[key] = entity.extra[key]
+ if 'country' in t:
+ t['country_code'] = t.pop('country')
+
t['issns'] = []
if entity.issnl:
t['issns'].append(entity.issnl)