aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-01-18 14:35:57 -0800
committerBryan Newbold <bnewbold@archive.org>2021-01-18 14:35:57 -0800
commit7b95c8470345608480f3c3759c2782b1b0a08872 (patch)
tree37048a49849eb89d45fb540b15b9060dfb1d0e8e
parentca11f5f79fe520b7b963d2a1263fe58523e211fd (diff)
downloadfatcat-scholar-7b95c8470345608480f3c3759c2782b1b0a08872.tar.gz
fatcat-scholar-7b95c8470345608480f3c3759c2782b1b0a08872.zip
fix indexing bug (false-y publisher_type?)
-rw-r--r--fatcat_scholar/schema.py2
1 files changed, 2 insertions, 0 deletions
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")