summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-03-28 23:14:25 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-03-28 23:14:25 -0700
commit48cc4c85008bb3fa2751c042112467c7e60a96aa (patch)
tree311e4c1ff88c3df39dfc2c1482a13af0b35bcc94
parent4d484c18add7d6ac05a28e9fb0ca01298381ed41 (diff)
downloadfatcat-48cc4c85008bb3fa2751c042112467c7e60a96aa.tar.gz
fatcat-48cc4c85008bb3fa2751c042112467c7e60a96aa.zip
web: small corrections to subtitle/original_name
-rw-r--r--python/fatcat_web/entity_helpers.py2
-rw-r--r--python/fatcat_web/templates/entity_base.html4
2 files changed, 4 insertions, 2 deletions
diff --git a/python/fatcat_web/entity_helpers.py b/python/fatcat_web/entity_helpers.py
index 7ac0f155..d82ea0e9 100644
--- a/python/fatcat_web/entity_helpers.py
+++ b/python/fatcat_web/entity_helpers.py
@@ -76,6 +76,8 @@ def enrich_release_entity(entity):
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
diff --git a/python/fatcat_web/templates/entity_base.html b/python/fatcat_web/templates/entity_base.html
index 189d52b0..f30df0da 100644
--- a/python/fatcat_web/templates/entity_base.html
+++ b/python/fatcat_web/templates/entity_base.html
@@ -26,8 +26,8 @@
<h1 class="ui header">
{% if entity_type == "container" %}
{{ entity.name }}
- {% if entity.extra.original_title %}
- <br><span style="font-size: smaller; font-weight: normal;">{{ entity.extra.original_title }}</span>
+ {% if entity.extra.original_name %}
+ <br><span style="font-size: smaller; font-weight: normal;">{{ entity.extra.original_name }}</span>
{% endif %}
{% elif entity_type == "creator" %}
{{ entity.display_name }}