1
0
Fork 0
forked from github/pelican

Oops. Make a copy of the list before modifying it !

This commit is contained in:
Alexis Metaireau 2010-11-27 15:20:38 +00:00
commit dd202744d0

View file

@ -89,7 +89,7 @@ class ArticlesProcessor(Processor):
# sort the articles by date
self.articles.sort(key=attrgetter('date'), reverse=True)
self.dates = self.articles
self.dates = list(self.articles)
self.dates.sort(key=attrgetter('date'))
# and generate the output :)
self._update_context(context, ('articles', 'dates', 'tags', 'categories'))