From 1c768554d1ccaa270b267940aeca2e9bed885bf2 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 23 Jun 2020 17:39:08 -0700 Subject: issn_meta: mainTitle can be an array --- chocula/directories/issn_meta.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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": -- cgit v1.2.3