From 7b95c8470345608480f3c3759c2782b1b0a08872 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 18 Jan 2021 14:35:57 -0800 Subject: fix indexing bug (false-y publisher_type?) --- fatcat_scholar/schema.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fatcat_scholar') diff --git a/fatcat_scholar/schema.py b/fatcat_scholar/schema.py index 5ac3aab..5306130 100644 --- a/fatcat_scholar/schema.py +++ b/fatcat_scholar/schema.py @@ -483,6 +483,8 @@ def es_biblio_from_release(release: ReleaseEntity) -> ScholarBiblio: if release.container: publisher = release.container.publisher or release.publisher publisher_type = release.container.extra.get("publisher_type", None) + if not publisher_type or not isinstance(publisher_type, str): + publisher_type = None container_name = release.container.name container_original_name = ( release.container.extra and release.container.extra.get("original_name") -- cgit v1.2.3