summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hyperkitty/templates/recent_activities.html2
-rw-r--r--hyperkitty/views/list.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/hyperkitty/templates/recent_activities.html b/hyperkitty/templates/recent_activities.html
index 0ba7510..3a475e4 100644
--- a/hyperkitty/templates/recent_activities.html
+++ b/hyperkitty/templates/recent_activities.html
@@ -79,6 +79,8 @@
<h3>Most popular discussions</h3>
{% for thread in pop_threads %}
{% include "threads/summary_thread.html" with counter=forloop.counter %}
+ {% empty %}
+ <p>No votes this month (yet).</p>
{% endfor %}
</section>
</div>
diff --git a/hyperkitty/views/list.py b/hyperkitty/views/list.py
index 8a96fd2..23a668e 100644
--- a/hyperkitty/views/list.py
+++ b/hyperkitty/views/list.py
@@ -200,7 +200,8 @@ def overview(request, mlist_fqdn=None):
"count": poster[2]})
# Popular threads
- pop_threads = sorted(threads, key=lambda t: t.likes - t.dislikes,
+ pop_threads = sorted([ t for t in threads if t.likes - t.dislikes > 0 ],
+ key=lambda t: t.likes - t.dislikes,
reverse=True)[:5]
# List activity