diff --git a/publichealth/home/templatetags/navigation.py b/publichealth/home/templatetags/navigation.py index 7025c5d..f03aea3 100644 --- a/publichealth/home/templatetags/navigation.py +++ b/publichealth/home/templatetags/navigation.py @@ -78,15 +78,13 @@ def menuitems_children(parent, context=None): items_to_remove = [] for menuitem in menuitems_children: try: - if type(menuitem) == ContactForm: - menuitem.title = menuitem.title - else: - menuitem.title = menuitem.trans_title if 'devenez' in menuitem.title.lower() and remove_devenez: items_to_remove.append(menuitem) elif 'mitglied werden' in menuitem.title.lower() and remove_mitglied: items_to_remove.append(menuitem) + menuitem.title = menuitem.trans_title except AttributeError: + print("Menuitem %s has an issue :: %s" % (menuitem.title, str(ae))) pass for item in items_to_remove: menuitems_children = menuitems_children & Page.objects.not_page(item)