diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2020-01-31 01:44:46 +0100 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2020-01-31 01:44:46 +0100 |
commit | a42206d2603e28f1311ac3873dc168c78eabffee (patch) | |
tree | 085e9aeee9188b88fb642623ad7c97451faa9088 /python | |
parent | 706a2d388f22ada2e3c88b7c58d3a74b1290a6a0 (diff) | |
download | fatcat-a42206d2603e28f1311ac3873dc168c78eabffee.tar.gz fatcat-a42206d2603e28f1311ac3873dc168c78eabffee.zip |
datacite: add exception for https://www.micropublication.org/
Diffstat (limited to 'python')
-rw-r--r-- | python/fatcat_tools/importers/datacite.py | 5 | ||||
-rw-r--r-- | python/tests/files/datacite/datacite_result_30.json | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py index f1049909..b060a18e 100644 --- a/python/fatcat_tools/importers/datacite.py +++ b/python/fatcat_tools/importers/datacite.py @@ -390,6 +390,11 @@ class DataciteImporter(EntityImporter): len(container_name))) container_name = container_name[0] + # Exception: https://www.micropublication.org/, see: !MR24. + if container_id is None and container_name is None: + if publisher and publisher.lower().startswith('micropublication'): + container_name = publisher + # Volume and issue. volume = container.get('volume') issue = container.get('issue') diff --git a/python/tests/files/datacite/datacite_result_30.json b/python/tests/files/datacite/datacite_result_30.json index f7d1bb2c..fc2c4dfc 100644 --- a/python/tests/files/datacite/datacite_result_30.json +++ b/python/tests/files/datacite/datacite_result_30.json @@ -28,7 +28,8 @@ "extra": { "datacite": { "resourceTypeGeneral": "DataPaper" - } + }, + "container_name": "microPublication Biology" }, "refs": [], "release_stage": "published", |