From 11180abbba8af29499e6eda2c7c408fc4e0eb80a Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Fri, 2 Oct 2020 03:16:18 +0300 Subject: Split author's list into it's own variable * wqflask/wqflask/templates/correlation_page.html: Ditto. Prevents jinja from throwing an error due to compaing a list type with an int. --- wqflask/wqflask/templates/correlation_page.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html index bb2a697f..435c0b37 100644 --- a/wqflask/wqflask/templates/correlation_page.html +++ b/wqflask/wqflask/templates/correlation_page.html @@ -170,7 +170,8 @@ {% endif %} {% if trait.description_display|length > 70 %}{{ trait.description_display[:70] }}...{% else %}{{ trait.description_display }}{% endif %} {% if trait.authors %} - {% if trait.authors.split(',') > 6 %}{{ trait.authors.split(',')[:6]|join(', ') }}, et al.{% else %}{{ trait.authors }}{% endif %} + {% set authors_list = trait.authors.split(',') %} + {% if authors_list|length > 6 %}{{ authors_list[:6]|join(', ') }}, et al.{% else %}{{ trait.authors }}{% endif %} {% else %} N/A {% endif %} -- cgit v1.2.3