summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2022-01-06 07:30:00 -0800
committerBryan Newbold <bnewbold@archive.org>2022-01-06 07:30:00 -0800
commite2bcaba3381c5af5f40f0c1ec2ccb5bdcdd18c7f (patch)
treeb75555ca94515f614dccefa4c2eb3d306932667e
parentd7c04087572915c93df753eb38db986921b357f6 (diff)
downloadfatcat-scholar-e2bcaba3381c5af5f40f0c1ec2ccb5bdcdd18c7f.tar.gz
fatcat-scholar-e2bcaba3381c5af5f40f0c1ec2ccb5bdcdd18c7f.zip
SIM transform: handle multiple publishers
-rw-r--r--fatcat_scholar/transform.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/fatcat_scholar/transform.py b/fatcat_scholar/transform.py
index ae4a181..c7d49d3 100644
--- a/fatcat_scholar/transform.py
+++ b/fatcat_scholar/transform.py
@@ -169,6 +169,10 @@ def es_biblio_from_sim(sim: Dict[str, Any]) -> ScholarBiblio:
language = language[0]
lang_code = SIM_LANG_MAP.get(language)
+ publisher = issue_meta.get("publisher") or pub_meta.get("publisher")
+ if isinstance(publisher, list):
+ publisher = publisher[0]
+
return ScholarBiblio(
# release_ident=release.ident,
title=None,
@@ -192,7 +196,7 @@ def es_biblio_from_sim(sim: Dict[str, Any]) -> ScholarBiblio:
# number=None,
# no external identifiers
# license_slug=release.license_slug,
- publisher=issue_meta.get("publisher") or pub_meta.get("publisher"),
+ publisher=publisher,
container_name=container_name,
container_original_name=None,
container_ident=None, # TODO