Skip to content
Permalink
Browse files

Allowing parts of the hierarchy to be missing.

  • Loading branch information
felixfontein committed Oct 15, 2016
1 parent 425f8e9 commit fad297c9ca6fa1814e627b2b8d960dc2a5c9e961
Showing with 4 additions and 1 deletion.
  1. +4 −1 v7/hierarchical_pages/hierarchical_pages.py
@@ -167,7 +167,10 @@ def crawl(node, destinations_so_far):
except Exception as err:
LOGGER.error('Error reading post {}'.format(base_path))
raise err
destinations_so_far = {lang: os.path.join(dest, node.slugs[lang]) for lang, dest in destinations_so_far.items()}
if node.slugs is not None:
destinations_so_far = {lang: os.path.join(dest, node.slugs[lang]) for lang, dest in destinations_so_far.items()}
else:
destinations_so_far = {lang: os.path.join(dest, node.name) for lang, dest in destinations_so_far.items()}
for p, n in node.children.items():
crawl(n, destinations_so_far)

0 comments on commit fad297c

Please sign in to comment.
You can’t perform that action at this time.