From 425142403ff14b4f9011330a3dda26f388f24264 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Fri, 20 Nov 2015 11:38:53 -0200 Subject: [PATCH] Fix composicao parlamentar Edit --- comissoes/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/comissoes/views.py b/comissoes/views.py index 3a20db2fb..d95f07b24 100644 --- a/comissoes/views.py +++ b/comissoes/views.py @@ -238,8 +238,10 @@ class ComissaoParlamentarEditView(FormMixin, GenericView): def get(self, request, *args, **kwargs): participacao_id = kwargs['id'] participacao = Participacao.objects.get(id=participacao_id) + comissao = Comissao.objects.get(id=self.kwargs['pk']) form = ParticipacaoCadastroForm( initial={'parlamentar_id': participacao.parlamentar.id}, instance=participacao) print(form) return self.render_to_response({'form': form, + 'comissao': comissao, 'composicao_id': self.kwargs['id']})