From 909361ca10ef0afefa3d929e56dff674c33c654b Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Fri, 17 May 2019 08:41:03 -0300 Subject: [PATCH] Fix #2873 --- 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