From a2b566ae45a28345c19e9256470e3623fc9aedca Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 28 Jun 2017 13:22:55 -0300 Subject: [PATCH] Fixes #1230 (#1232) --- sapl/parlamentares/views.py | 5 ++++- sapl/templates/parlamentares/materias.html | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sapl/parlamentares/views.py b/sapl/parlamentares/views.py index b57e5af0d..061ecb914 100644 --- a/sapl/parlamentares/views.py +++ b/sapl/parlamentares/views.py @@ -225,8 +225,9 @@ class MandatoCrud(MasterDetailCrud): ordering = ('-legislatura__numero') def get_context_data(self, **kwargs): - context = super(MasterDetailCrud.ListView, self).get_context_data(kwargs=kwargs) + context = super().get_context_data(**kwargs) rows = context['rows'] + coluna_coligacao = 2 coluna_votos_recebidos = 3 for row in rows: @@ -512,9 +513,11 @@ class ParlamentarMateriasView(FormView): autor_list = self.get_autoria(autoria) coautor_list = self.get_autoria(coautoria) + parlamentar_pk = autor.autor_related.pk nome_parlamentar = autor.autor_related.nome_parlamentar return self.render_to_response({'autor_pk': autor.pk, + 'root_pk': parlamentar_pk, 'autoria': autor_list, 'coautoria': coautor_list, 'nome_parlamentar': nome_parlamentar diff --git a/sapl/templates/parlamentares/materias.html b/sapl/templates/parlamentares/materias.html index 78444c11e..1013f3d58 100644 --- a/sapl/templates/parlamentares/materias.html +++ b/sapl/templates/parlamentares/materias.html @@ -45,6 +45,7 @@ {% endfor %} {%endfor %} +

Total: {{ coautoria.1 }}