From 168b203c66df4e4c27b0196bf36fe137c8d04802 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Fri, 17 Mar 2017 13:25:37 -0300 Subject: [PATCH] Fixes #904 --- sapl/parlamentares/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sapl/parlamentares/views.py b/sapl/parlamentares/views.py index 17eb81272..7365168e5 100644 --- a/sapl/parlamentares/views.py +++ b/sapl/parlamentares/views.py @@ -314,11 +314,11 @@ class ParlamentarCrud(Crud): mandato__legislatura_id=legislatura_id) else: try: - l = Legislatura.objects.all().order_by('-data_inicio').first().pk + l = Legislatura.objects.all().order_by('-data_inicio').first() except ObjectDoesNotExist: return [] else: - return queryset.filter(mandato__legislatura_id=l) + return queryset.filter(mandato__legislatura_id=l.pk) def get_headers(self): return ['', _('Parlamentar'), _('Partido'), _('Ativo?')]