From 9a1f3f770f61bee07081777c4cd0e5a0a0f02666 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Wed, 6 Feb 2019 13:56:20 -0200 Subject: [PATCH] HOT-FIX: corrige erro introduzido em c2ebae0 --- sapl/norma/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sapl/norma/forms.py b/sapl/norma/forms.py index c49f94889..bf676c242 100644 --- a/sapl/norma/forms.py +++ b/sapl/norma/forms.py @@ -356,7 +356,8 @@ class NormaRelacionadaForm(ModelForm): def save(self, commit=False): relacionada = super(NormaRelacionadaForm, self).save(commit) relacionada.norma_relacionada = self.cleaned_data['norma_relacionada'] - relacionada.norma_relacionada.data_vigencia = relacionada.norma_principal.data + if relacionada.tipo_vinculo.revoga_integralmente: + relacionada.norma_relacionada.data_vigencia = relacionada.norma_principal.data relacionada.norma_relacionada.save() relacionada.save() return relacionada