diff options
Diffstat (limited to 'python/fatcat_web/entity_helpers.py')
-rw-r--r-- | python/fatcat_web/entity_helpers.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/fatcat_web/entity_helpers.py b/python/fatcat_web/entity_helpers.py index 4d13da43..d82ea0e9 100644 --- a/python/fatcat_web/entity_helpers.py +++ b/python/fatcat_web/entity_helpers.py @@ -72,6 +72,12 @@ def enrich_release_entity(entity): # November 1. if ref.extra and ref.extra.get('unstructured'): 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 isinstance(entity.extra['subtitle'], str): + entity.subtitle = entity.extra['subtitle'] + elif isinstance(entity.extra['subtitle'], list): + entity.subtitle = entity.extra['subtitle'][0] or None # author list to display; ensure it's sorted by index (any othors with # index=None go to end of list) authors = [c for c in entity.contribs if |