Avoid failure if no sections is specified in gallery

This commit is contained in:
Thomas Nonglaton 2017-06-03 12:32:43 +02:00
parent 5142b13a23
commit 4e20f74907

View File

@ -441,7 +441,7 @@ def build_gallery(settings, gallery_settings, gallery_path, template):
Audio.base_dir = Path(".").joinpath(gallery_path)
Audio.target_dir = Path(".").joinpath("build", gallery_path)
if gallery_settings.get("sections"):
for x in gallery_settings['sections']:
if x['type'] not in gallery_settings:
gallery_settings[x['type'] + '_enabled'] = True