diff --git a/templates/mailing_list/emails.html b/templates/mailing_list/emails.html index 84cc3d9..0214e3a 100644 --- a/templates/mailing_list/emails.html +++ b/templates/mailing_list/emails.html @@ -8,10 +8,10 @@ Filters
- {% for tag in tags %} + {% for tag in tags.keys()|sort %}
{{ tag }}: - {% for value in tags[tag] %} + {% for value in tags[tag]|sort %} {% endfor %}
diff --git a/web.py b/web.py index eae3fc6..d3c7cbd 100644 --- a/web.py +++ b/web.py @@ -777,15 +777,14 @@ def threads(repository): thread_date, thread_time, thread_id, thread_title = obj.name.split(' ', 3) - thread_tags = {} try: thread_tags = parse_thread_tags(obj['tags'].data.decode('UTF-8')) # Collect tags for filters for k, v in thread_tags.items(): - tags[k] = tags.get(k, []) + v + tags[k] = tags.get(k, set()).union(v) except: - pass + thread_tags = {} # Check if we should filter out this thread from the list keep = True