diff options
author | Bryan Newbold <bnewbold@archive.org> | 2022-01-06 07:30:00 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2022-01-06 07:30:00 -0800 |
commit | e2bcaba3381c5af5f40f0c1ec2ccb5bdcdd18c7f (patch) | |
tree | b75555ca94515f614dccefa4c2eb3d306932667e /fatcat_scholar/transform.py | |
parent | d7c04087572915c93df753eb38db986921b357f6 (diff) | |
download | fatcat-scholar-e2bcaba3381c5af5f40f0c1ec2ccb5bdcdd18c7f.tar.gz fatcat-scholar-e2bcaba3381c5af5f40f0c1ec2ccb5bdcdd18c7f.zip |
SIM transform: handle multiple publishers
Diffstat (limited to 'fatcat_scholar/transform.py')
-rw-r--r-- | fatcat_scholar/transform.py | 6 |
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 |