Fix for exception

Check that ‘extension_props’ exists in project before looking for
EXTENSION_NAME.
This commit is contained in:
2019-04-03 17:36:27 +02:00
parent c971f799ef
commit 4473d56379

View File

@@ -463,7 +463,7 @@ def project_landing(project_url):
# Load custom project properties. If the project has a 'cloud' extension prop, # Load custom project properties. If the project has a 'cloud' extension prop,
# render it using the projects/landing.html template and try to attach a # render it using the projects/landing.html template and try to attach a
# number of additional attributes (pages, images, etc.). # number of additional attributes (pages, images, etc.).
if EXTENSION_NAME in project.extension_props: if 'extension_props' in project and EXTENSION_NAME in project['extension_props']:
extension_props = project['extension_props'][EXTENSION_NAME] extension_props = project['extension_props'][EXTENSION_NAME]
file_props = {'picture_16_9', 'logo'} file_props = {'picture_16_9', 'logo'}
for f in file_props: for f in file_props: