From 3f27bc4a0a6b4b2d9451e1c7b8c65d0dee9d233b Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Mon, 30 May 2016 11:24:46 -0300 Subject: [PATCH] Cobre os casos em que a logica quebra --- base/templatetags/menus.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/base/templatetags/menus.py b/base/templatetags/menus.py index 6591823b6..44d3cb0e4 100644 --- a/base/templatetags/menus.py +++ b/base/templatetags/menus.py @@ -29,7 +29,12 @@ def subnav(context, path=None): app = request.resolver_match.app_name # Esse IF elimina o bug do subnav em Tabelas Auxiliares # e também em proposições - if request.path.find(app) == -1: + if (request.path.find('parlamentar') != -1 and + app == 'parlamentares' or + request.path.find('comissao') != -1 and app == 'comissoes'): + pass + elif (request.path.find(app) == -1 or + request.path.find('sistema') != -1): return default_path = '%s/subnav.yaml' % app path = os.path.join(TEMPLATES_DIR, path or default_path)