aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2020-10-02 03:16:18 +0300
committerBonfaceKilz2020-10-02 03:16:18 +0300
commit11180abbba8af29499e6eda2c7c408fc4e0eb80a (patch)
treee747de1d0fd71069dbbc39812a4e2ebafeec10d7
parent2f60231f9ea759afe3e6d5739934cd293e3992c9 (diff)
downloadgenenetwork2-11180abbba8af29499e6eda2c7c408fc4e0eb80a.tar.gz
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.
-rw-r--r--wqflask/wqflask/templates/correlation_page.html3
1 files changed, 2 insertions, 1 deletions
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 %}
<td data-export="{{ trait.description_display }}">{% if trait.description_display|length > 70 %}{{ trait.description_display[:70] }}...{% else %}{{ trait.description_display }}{% endif %}</td>
{% if trait.authors %}
- <td data-export="{{ trait.authors }}">{% if trait.authors.split(',') > 6 %}{{ trait.authors.split(',')[:6]|join(', ') }}, et al.{% else %}{{ trait.authors }}{% endif %}</td>
+ {% set authors_list = trait.authors.split(',') %}
+ <td data-export="{{ trait.authors }}">{% if authors_list|length > 6 %}{{ authors_list[:6]|join(', ') }}, et al.{% else %}{{ trait.authors }}{% endif %}</td>
{% else %}
<TD data-export="N/A">N/A</TD>
{% endif %}