diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-06-23 17:39:08 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-06-23 17:39:08 -0700 |
commit | 1c768554d1ccaa270b267940aeca2e9bed885bf2 (patch) | |
tree | bac87c8278d9ad69bb37d4f96f640d73f9e12657 | |
parent | 75f9f0538a40f92534f88884ec24e58b207bf3c8 (diff) | |
download | chocula-1c768554d1ccaa270b267940aeca2e9bed885bf2.tar.gz chocula-1c768554d1ccaa270b267940aeca2e9bed885bf2.zip |
issn_meta: mainTitle can be an array
-rw-r--r-- | chocula/directories/issn_meta.py | 5 |
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": |