Minor addition
This commit is contained in:
parent
5a8f9fdf03
commit
429d6bd8f2
2 changed files with 5 additions and 3 deletions
|
@ -126,9 +126,12 @@ class BlogNavModifier(Modifier):
|
||||||
namespace = resolve(request.path).namespace
|
namespace = resolve(request.path).namespace
|
||||||
config = app.get_config(namespace)
|
config = app.get_config(namespace)
|
||||||
try:
|
try:
|
||||||
if config and config.menu_structure != MENU_TYPE_CATEGORIES:
|
if config and (
|
||||||
|
not isinstance(config, BlogConfig) or
|
||||||
|
config.menu_structure != MENU_TYPE_CATEGORIES
|
||||||
|
):
|
||||||
return nodes
|
return nodes
|
||||||
except AttributeError:
|
except AttributeError: # pragma: no cover
|
||||||
# in case `menu_structure` is not present in config
|
# in case `menu_structure` is not present in config
|
||||||
return nodes
|
return nodes
|
||||||
if post_cut:
|
if post_cut:
|
||||||
|
|
|
@ -9,7 +9,6 @@ from .models import CustomUser
|
||||||
class CustomUserAdmin(UserAdmin):
|
class CustomUserAdmin(UserAdmin):
|
||||||
model = CustomUser
|
model = CustomUser
|
||||||
|
|
||||||
|
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
(None, {'fields': ('username', 'password')}),
|
(None, {'fields': ('username', 'password')}),
|
||||||
(_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}),
|
(_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}),
|
||||||
|
|
Loading…
Reference in a new issue