|
|
@ -347,17 +347,12 @@ class ParlamentarCrud(Crud): |
|
|
# Coloca a filiação atual ao invés da última |
|
|
# Coloca a filiação atual ao invés da última |
|
|
if row[0][1]: |
|
|
if row[0][1]: |
|
|
# Pega o Parlamentar por meio da pk |
|
|
# Pega o Parlamentar por meio da pk |
|
|
try: |
|
|
|
|
|
parlamentar = Parlamentar.objects.get( |
|
|
parlamentar = Parlamentar.objects.get( |
|
|
id=(row[0][1].split('/')[-1])) |
|
|
id=(row[0][1].split('/')[-1])) |
|
|
except ObjectDoesNotExist: |
|
|
|
|
|
raise ObjectDoesNotExist |
|
|
|
|
|
# Pega a Legislatura |
|
|
# Pega a Legislatura |
|
|
try: |
|
|
|
|
|
legislatura = Legislatura.objects.get( |
|
|
legislatura = Legislatura.objects.get( |
|
|
id=context['legislatura_id']) |
|
|
id=context['legislatura_id']) |
|
|
except ObjectDoesNotExist: |
|
|
|
|
|
raise ObjectDoesNotExist |
|
|
|
|
|
|
|
|
|
|
|
# As condições para mostrar a filiação são: |
|
|
# As condições para mostrar a filiação são: |
|
|
# A data de filiacao deve ser menor que a data de fim |
|
|
# A data de filiacao deve ser menor que a data de fim |
|
|
|