|
@ -784,10 +784,15 @@ class RelatoriaCrud(MasterDetailCrud): |
|
|
def get_context_data(self, **kwargs): |
|
|
def get_context_data(self, **kwargs): |
|
|
context = super().get_context_data(**kwargs) |
|
|
context = super().get_context_data(**kwargs) |
|
|
|
|
|
|
|
|
|
|
|
try: |
|
|
comissao = Comissao.objects.get( |
|
|
comissao = Comissao.objects.get( |
|
|
pk=context['form'].initial['comissao']) |
|
|
pk=context['form'].initial['comissao']) |
|
|
|
|
|
except ObjectDoesNotExist: |
|
|
|
|
|
pass |
|
|
|
|
|
else: |
|
|
composicao = comissao.composicao_set.last() |
|
|
composicao = comissao.composicao_set.last() |
|
|
participacao = Participacao.objects.filter(composicao=composicao) |
|
|
participacao = Participacao.objects.filter( |
|
|
|
|
|
composicao=composicao) |
|
|
|
|
|
|
|
|
parlamentares = [] |
|
|
parlamentares = [] |
|
|
for p in participacao: |
|
|
for p in participacao: |
|
|