From 2fdd2e37e5d57cd7301701d897e35d6cf91851a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 29 Dec 2014 12:58:23 +0100 Subject: [PATCH] questions: handle empty tag list --- askbot/models/question.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/askbot/models/question.py b/askbot/models/question.py index 4bd8fb0e..04eeb7e9 100644 --- a/askbot/models/question.py +++ b/askbot/models/question.py @@ -122,7 +122,7 @@ class ThreadManager(BaseQuerySetManager): tag_list.sort(key=lambda t: tag_counts[t], reverse=True) #note that double quote placement is important here - if len(tag_list) == 1: + if len(tag_list) <= 1: last_topic = '"' elif len(tag_list) <= 5: last_topic = _('" and "%s"') % tag_list.pop()