summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-03-28 22:19:50 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-03-28 22:19:57 -0700
commit49891b9b306fcab27b0e55c1979269aa88580323 (patch)
treeb127ea651a7d740a6973d0a9265c6f308c15d7ab /python/fatcat_web
parent91c6e7e638a0059549c0af638995e90fad81a2ed (diff)
downloadfatcat-49891b9b306fcab27b0e55c1979269aa88580323.tar.gz
fatcat-49891b9b306fcab27b0e55c1979269aa88580323.zip
web: use more idiomatic type check
Thanks to Martin for suggestion
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/entity_helpers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/fatcat_web/entity_helpers.py b/python/fatcat_web/entity_helpers.py
index 6dfac3df..7a9830f9 100644
--- a/python/fatcat_web/entity_helpers.py
+++ b/python/fatcat_web/entity_helpers.py
@@ -74,7 +74,7 @@ def enrich_release_entity(entity):
ref.extra['unstructured'] = strip_extlink_xml(ref.extra['unstructured'])
# for backwards compatability, copy extra['subtitle'] to subtitle
if not entity.subtitle and entity.extra and entity.extra.get('subtitle'):
- if type(entity.extra['subtitle']) == str:
+ if isinstance(entity.extra['subtitle'], str):
entity.subtitle = entity.extra['subtitle']
# author list to display; ensure it's sorted by index (any othors with
# index=None go to end of list)