Skip to content

Commit

Permalink
Fixing wrong usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Nov 30, 2016
1 parent 099165d commit 81b8caa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nikola/plugins/misc/taxonomies_classifier.py
Expand Up @@ -76,7 +76,10 @@ def _do_classification(self, site):
else:
post.meta[lang][taxonomy.metadata_name] = classifications[lang][0] if len(classifications[lang]) > 0 else None
if taxonomy.metadata_friendly_name is not None:
friendly_names = [taxonomy.get_classification_friendly_name(classification, lang) for classification in classifications[lang]]
if taxonomy.has_hierarchy:
friendly_names = [taxonomy.get_classification_friendly_name(taxonomy.extract_hierarchy(classification), lang) for classification in classifications[lang]]
else:
friendly_names = [taxonomy.get_classification_friendly_name(classification, lang) for classification in classifications[lang]]
if taxonomy.more_than_one_classifications_per_post:
post.meta[lang][taxonomy.metadata_friendly_name] = friendly_names
else:
Expand Down

0 comments on commit 81b8caa

Please sign in to comment.