summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers
diff options
context:
space:
mode:
authorbnewbold <bnewbold@archive.org>2020-04-24 00:07:45 +0000
committerbnewbold <bnewbold@archive.org>2020-04-24 00:07:45 +0000
commit661579dfc7025a9443bc41fd8f344096119cdfd3 (patch)
tree866ef4e21dc03b524b7db497eae1b31bbd099c42 /python/fatcat_tools/importers
parent5576efabea5c3e5db1a8b57aef3dc4b4006dd46c (diff)
parente0baeade7924019c5bbd27d9a7c116a1e26854fc (diff)
downloadfatcat-661579dfc7025a9443bc41fd8f344096119cdfd3.tar.gz
fatcat-661579dfc7025a9443bc41fd8f344096119cdfd3.zip
Merge branch 'martin-datacite-fix-parse-record-int' into 'master'
datacite: fix type error See merge request webgroup/fatcat!48
Diffstat (limited to 'python/fatcat_tools/importers')
-rw-r--r--python/fatcat_tools/importers/datacite.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py
index 244984f5..d998f266 100644
--- a/python/fatcat_tools/importers/datacite.py
+++ b/python/fatcat_tools/importers/datacite.py
@@ -496,10 +496,12 @@ class DataciteImporter(EntityImporter):
if not desc.get('descriptionType') == 'Abstract':
continue
- # Description maybe a string or list.
+ # Description maybe a string, int or list.
text = desc.get('description', '')
if not text:
continue
+ if isinstance(text, int):
+ text = '{}'.format(text)
if isinstance(text, list):
try:
text = "\n".join(text)