From 64e4a0b3c43b53f5c79e6f17a189c7f5ec113c5b Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Sat, 30 Jan 2021 19:00:45 -0800 Subject: bigfix: try resolving lang_code list issue again --- fatcat_scholar/transform.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'fatcat_scholar') diff --git a/fatcat_scholar/transform.py b/fatcat_scholar/transform.py index 4114885..18410c3 100644 --- a/fatcat_scholar/transform.py +++ b/fatcat_scholar/transform.py @@ -138,11 +138,10 @@ def es_biblio_from_sim(sim: Dict[str, Any]) -> ScholarBiblio: if release_year and abs(release_year) > 2050: release_year = None - lang_code = SIM_LANG_MAP.get(issue_meta.get("language")) or SIM_LANG_MAP.get( - pub_meta.get("language") - ) - if isinstance(lang_code, list): - lang_code = lang_code[0] + language = issue_meta.get("language") or pub_meta.get("language") + if isinstance(language, list): + language = language[0] + lang_code = SIM_LANG_MAP.get(language) return ScholarBiblio( # release_ident=release.ident, -- cgit v1.2.3