summaryrefslogtreecommitdiffstats
path: root/hyperkitty/views
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2013-02-13 19:04:27 +0100
committerAurélien Bompard <aurelien@bompard.org>2013-02-13 19:04:27 +0100
commit0de68afc823627fa20bfad7cc7c04d24a2017865 (patch)
treea6831e80acab7ff9f9a2c327d67acf94ecedaa19 /hyperkitty/views
parent02d09d5304823de3439bc0eb701cddbdb66c0d42 (diff)
downloadhyperkitty-0de68afc823627fa20bfad7cc7c04d24a2017865.tar.gz
hyperkitty-0de68afc823627fa20bfad7cc7c04d24a2017865.tar.xz
hyperkitty-0de68afc823627fa20bfad7cc7c04d24a2017865.zip
Fix the tags display
Diffstat (limited to 'hyperkitty/views')
-rw-r--r--hyperkitty/views/list.py7
-rw-r--r--hyperkitty/views/thread.py2
2 files changed, 8 insertions, 1 deletions
diff --git a/hyperkitty/views/list.py b/hyperkitty/views/list.py
index 7dbb1ad..66f7913 100644
--- a/hyperkitty/views/list.py
+++ b/hyperkitty/views/list.py
@@ -113,6 +113,13 @@ def _thread_list(request, mlist, threads, template_name='thread_list.html', extr
else:
thread.favorite = True
+ # Tags
+ try:
+ thread.tags = Tag.objects.filter(threadid=thread.thread_id,
+ list_address=mlist.name)
+ except Tag.DoesNotExist:
+ thread.tags = []
+
all_threads = threads
paginator = Paginator(threads, 10)
page_num = request.GET.get('page')
diff --git a/hyperkitty/views/thread.py b/hyperkitty/views/thread.py
index a1788cd..7929ac6 100644
--- a/hyperkitty/views/thread.py
+++ b/hyperkitty/views/thread.py
@@ -74,7 +74,7 @@ def thread_index(request, mlist_fqdn, threadid, month=None, year=None):
try:
tags = Tag.objects.filter(threadid=threadid, list_address=mlist_fqdn)
except Tag.DoesNotExist:
- tags = {}
+ tags = []
# Favorites
fav_action = "add"