diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-01-18 14:35:57 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-01-18 14:35:57 -0800 |
commit | 7b95c8470345608480f3c3759c2782b1b0a08872 (patch) | |
tree | 37048a49849eb89d45fb540b15b9060dfb1d0e8e | |
parent | ca11f5f79fe520b7b963d2a1263fe58523e211fd (diff) | |
download | fatcat-scholar-7b95c8470345608480f3c3759c2782b1b0a08872.tar.gz fatcat-scholar-7b95c8470345608480f3c3759c2782b1b0a08872.zip |
fix indexing bug (false-y publisher_type?)
-rw-r--r-- | fatcat_scholar/schema.py | 2 |
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") |