questions: handle empty tag list

This commit is contained in:
Frédéric Péters 2014-12-29 12:58:23 +01:00
parent 13dcf054cc
commit 2fdd2e37e5
1 changed files with 1 additions and 1 deletions

View File

@ -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()