aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-06-23 17:39:08 -0700
committerBryan Newbold <bnewbold@archive.org>2020-06-23 17:39:08 -0700
commit1c768554d1ccaa270b267940aeca2e9bed885bf2 (patch)
treebac87c8278d9ad69bb37d4f96f640d73f9e12657
parent75f9f0538a40f92534f88884ec24e58b207bf3c8 (diff)
downloadchocula-1c768554d1ccaa270b267940aeca2e9bed885bf2.tar.gz
chocula-1c768554d1ccaa270b267940aeca2e9bed885bf2.zip
issn_meta: mainTitle can be an array
-rw-r--r--chocula/directories/issn_meta.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/chocula/directories/issn_meta.py b/chocula/directories/issn_meta.py
index e6abb3c..23b2fed 100644
--- a/chocula/directories/issn_meta.py
+++ b/chocula/directories/issn_meta.py
@@ -43,7 +43,10 @@ class IssnMetaLoader(DirectoryLoader):
if el["@type"] == "http://id.loc.gov/ontologies/bibframe/IssnL":
info.issnl = clean_issn(el["value"])
if "mainTitle" in el:
- info.name = clean_str(el["mainTitle"])
+ if type(el["mainTitle"]) == list:
+ info.name = clean_str(el["mainTitle"][0])
+ else:
+ info.name = clean_str(el["mainTitle"])
if el.get("format") == "vocabularies/medium#Print":
info.issnp = clean_issn(el["issn"])
elif el.get("format") == "vocabularies/medium#Electronic":