Browse Source

Fixes #904

pull/949/head
Edward Ribeiro 8 years ago
parent
commit
168b203c66
  1. 4
      sapl/parlamentares/views.py

4
sapl/parlamentares/views.py

@ -314,11 +314,11 @@ class ParlamentarCrud(Crud):
mandato__legislatura_id=legislatura_id) mandato__legislatura_id=legislatura_id)
else: else:
try: try:
l = Legislatura.objects.all().order_by('-data_inicio').first().pk l = Legislatura.objects.all().order_by('-data_inicio').first()
except ObjectDoesNotExist: except ObjectDoesNotExist:
return [] return []
else: else:
return queryset.filter(mandato__legislatura_id=l) return queryset.filter(mandato__legislatura_id=l.pk)
def get_headers(self): def get_headers(self):
return ['', _('Parlamentar'), _('Partido'), _('Ativo?')] return ['', _('Parlamentar'), _('Partido'), _('Ativo?')]

Loading…
Cancel
Save