summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-01-21 09:47:07 -0800
committerBryan Newbold <bnewbold@archive.org>2021-01-21 09:47:07 -0800
commit176092c4e126704fe01988eee2fa82ad6efff641 (patch)
tree1ad5a00ccf10b8506e6daf54a878734f39f68787 /fatcat_scholar
parent7e9742a604baddebacafc052032f63d3d433b5d0 (diff)
downloadfatcat-scholar-176092c4e126704fe01988eee2fa82ad6efff641.tar.gz
fatcat-scholar-176092c4e126704fe01988eee2fa82ad6efff641.zip
fixup: check for container.extra in indexing pipeline
Diffstat (limited to 'fatcat_scholar')
-rw-r--r--fatcat_scholar/schema.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/fatcat_scholar/schema.py b/fatcat_scholar/schema.py
index 5306130..4287d53 100644
--- a/fatcat_scholar/schema.py
+++ b/fatcat_scholar/schema.py
@@ -482,7 +482,9 @@ 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)
+ publisher_type = release.container.extra and 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