Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix #2681 -- fix crashes when rendering subcategories
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Feb 25, 2017
1 parent 948df1e commit 4042134
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -16,6 +16,7 @@ Features
Bugfixes
--------

* Fix crashes when rendering subcategories (Issue #2681)
* Fix filters.html5lib_xmllike for laters html5lib (Issue #2648)
* Skip the current post in post lists (Issue #2666)
* Fix poor performance when compiling multiple markdown documents with
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/task/categories.py
Expand Up @@ -170,7 +170,7 @@ def provide_context_and_uptodate(self, cat, lang, node=None):
}
posts = self.site.posts_per_classification[self.classification_name][lang]
children = [child for child in node.children if len([post for post in posts.get(child.classification_name, []) if self.site.config['SHOW_UNTRANSLATED_POSTS'] or post.is_translation_available(lang)]) > 0]
subcats = [(child.name, self.site.link(self.classification_name, child.classification_name, lang), child.classification_name, child.classification_path) for child in children]
subcats = [(child.name, self.site.link(self.classification_name, child.classification_name, lang)) for child in children]
friendly_name = self.get_classification_friendly_name(cat, lang)
context = {
"title": self.site.config['CATEGORY_PAGES_TITLES'].get(lang, {}).get(cat, self.site.MESSAGES[lang]["Posts about %s"] % friendly_name),
Expand Down

0 comments on commit 4042134

Please sign in to comment.