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,8 +125,12 @@ class BlogNavModifier(Modifier):
|
|||
if app and app.app_config:
|
||||
namespace = resolve(request.path).namespace
|
||||
config = app.get_config(namespace)
|
||||
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
|
||||
current_post = getattr(request, get_setting('CURRENT_POST_IDENTIFIER'), None)
|
||||
|
|
Loading…
Reference in a new issue