Fix error when no config is found
This commit is contained in:
parent
5fe79315d6
commit
4d7ae8275f
1 changed files with 2 additions and 2 deletions
|
@ -25,9 +25,9 @@ class BlogCategoryMenu(CMSAttachMenu):
|
|||
config = False
|
||||
if hasattr(self, 'instance') and self.instance:
|
||||
config = BlogConfig.objects.get(namespace=self.instance.application_namespace)
|
||||
if config.menu_structure in (MENU_TYPE_COMPLETE, MENU_TYPE_CATEGORIES):
|
||||
if config and config.menu_structure in (MENU_TYPE_COMPLETE, MENU_TYPE_CATEGORIES):
|
||||
categories_menu = True
|
||||
if config.menu_structure in (MENU_TYPE_COMPLETE, MENU_TYPE_POSTS):
|
||||
if config and config.menu_structure in (MENU_TYPE_COMPLETE, MENU_TYPE_POSTS):
|
||||
posts_menu = True
|
||||
|
||||
if categories_menu:
|
||||
|
|
Loading…
Reference in a new issue