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:
|
if app and app.app_config:
|
||||||
namespace = resolve(request.path).namespace
|
namespace = resolve(request.path).namespace
|
||||||
config = app.get_config(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
|
return nodes
|
||||||
if post_cut:
|
if post_cut:
|
||||||
return nodes
|
return nodes
|
||||||
|
|
Loading…
Add table
Reference in a new issue