From: Guillaume Pellerin Date: Thu, 10 Nov 2016 12:01:03 +0000 (+0100) Subject: Fix no menu_id X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=c6719a5689720201e2a0435c94f706c470f64614;p=mezzo.git Fix no menu_id --- diff --git a/app/organization/core/templatetags/organization_tags.py b/app/organization/core/templatetags/organization_tags.py index e0603b4b..2411cb36 100644 --- a/app/organization/core/templatetags/organization_tags.py +++ b/app/organization/core/templatetags/organization_tags.py @@ -89,8 +89,9 @@ def no_parents(events): @register.filter def get_mezzanine_menu_name(menu_id): - return settings.PAGE_MENU_TEMPLATES[int(menu_id)-1][1] - #return getattr(settings, 'PAGE_MENU_TEMPLATES', menu_id) + if menu_id: + return settings.PAGE_MENU_TEMPLATES[int(menu_id)-1][1] + return 1 @register.filter def get_type(objects, type):