1
0
Fork 0
forked from github/pelican

default tags to []

This commit is contained in:
Alexis Metaireau 2011-03-23 16:41:24 +00:00
commit dfb214d47d

View file

@ -220,7 +220,7 @@ class ArticlesGenerator(Generator):
# create tag cloud
tag_cloud = defaultdict(int)
for article in self.articles:
for tag in article.tags:
for tag in getattr(article, 'tags', []):
tag_cloud[tag] += 1
tag_cloud = sorted(tag_cloud.items(), key = itemgetter(1), reverse = True)