Handle the case when there is no menu_structure in config
This commit is contained in:
parent
fb89f3b239
commit
5a8f9fdf03
1 changed files with 5 additions and 1 deletions
|
@ -125,7 +125,11 @@ class BlogNavModifier(Modifier):
|
|||
if app and app.app_config:
|
||||
namespace = resolve(request.path).namespace
|
||||
config = app.get_config(namespace)
|
||||
if config and config.menu_structure != MENU_TYPE_CATEGORIES:
|
||||
try:
|
||||
if config and config.menu_structure != MENU_TYPE_CATEGORIES:
|
||||
return nodes
|
||||
except AttributeError:
|
||||
# in case `menu_structure` is not present in config
|
||||
return nodes
|
||||
if post_cut:
|
||||
return nodes
|
||||
|
|
Loading…
Reference in a new issue