From d38dda53dd29024c8c855c64dfbb1529d0aaac83 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Mon, 6 Jan 2020 22:30:20 +0100 Subject: datacite: month field should be top-level --- python/fatcat_tools/importers/datacite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/fatcat_tools') diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py index a673f00b..1cee6db3 100644 --- a/python/fatcat_tools/importers/datacite.py +++ b/python/fatcat_tools/importers/datacite.py @@ -603,8 +603,6 @@ class DataciteImporter(EntityImporter): extra_datacite['license'] = license_extra if attributes.get('subjects'): extra_datacite['subjects'] = attributes['subjects'] - if release_month: - extra_datacite['month'] = release_month # Include certain relations from relatedIdentifiers. Keeping the # original structure of data here, which is a list of dicts, with @@ -630,6 +628,8 @@ class DataciteImporter(EntityImporter): # Always include datacite key, even if value is empty (dict). extra['datacite'] = extra_datacite + if release_month: + extra['month'] = release_month extids = self.lookup_ext_ids(doi=doi) -- cgit v1.2.3