From 4c2e70e8604d319b1cdeb22d7625e242a0bd6e26 Mon Sep 17 00:00:00 2001 From: Cesar Augusto de Carvalho Date: Mon, 20 May 2019 13:52:41 -0300 Subject: [PATCH] Fix #2873 (#2785) --- sapl/sessao/forms.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sapl/sessao/forms.py b/sapl/sessao/forms.py index 1e14b0f45..1e9b9c2f9 100644 --- a/sapl/sessao/forms.py +++ b/sapl/sessao/forms.py @@ -256,9 +256,15 @@ class RetiradaPautaForm(ModelForm): def save(self, commit=False): retirada = super(RetiradaPautaForm, self).save(commit=commit) if retirada.ordem: - retirada.materia = retirada.ordem.materia + ordem = retirada.ordem + retirada.materia = ordem.materia + ordem.votacao_aberta = False + ordem.save() elif retirada.expediente: - retirada.materia = retirada.expediente.materia + expediente = retirada.expediente + retirada.materia = expediente.materia + expediente.votacao_aberta = False + expediente.save() retirada.save() return retirada