Skip to content
Permalink
Browse files
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 40421340daab1c753687cdf46fb888124b6c8590
Showing with 2 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +1 −1 nikola/plugins/task/categories.py
@@ -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
@@ -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),

0 comments on commit 4042134

Please sign in to comment.