Browse Source

Retorna a última legislatura cadastrada

pull/1642/head
Edward Ribeiro 7 years ago
parent
commit
3d526c1bef
  1. 2
      sapl/parlamentares/views.py

2
sapl/parlamentares/views.py

@ -468,7 +468,7 @@ class ParlamentarCrud(Crud):
for l in Legislatura.objects.all(): for l in Legislatura.objects.all():
if l.atual(): if l.atual():
return l.id return l.id
return 0 return l.first()
def get_queryset(self): def get_queryset(self):
queryset = super().get_queryset() queryset = super().get_queryset()

Loading…
Cancel
Save