From 0a38515b60b0ea330c4980fa919215abeab39b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Sconetto?= Date: Wed, 13 Jun 2018 17:56:26 -0300 Subject: [PATCH] Fix #1999 (#2009) --- sapl/painel/views.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sapl/painel/views.py b/sapl/painel/views.py index 0cb151382..a185fed3b 100644 --- a/sapl/painel/views.py +++ b/sapl/painel/views.py @@ -315,10 +315,7 @@ def get_presentes(pk, response, materia): presentes_list = [] for p in presentes: - now_year = timezone.now().year - # Recupera a legislatura vigente - legislatura = Legislatura.objects.get(data_inicio__year__lte=now_year, - data_fim__year__gte=now_year) + legislatura = sessao.legislatura # Recupera os mandatos daquele parlamentar mandatos = p.parlamentar.mandato_set.filter(legislatura=legislatura)