From 74170a05139a7dfb3d546173a5614b6e9f8c0bcd Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Thu, 5 Dec 2019 13:10:13 -0300 Subject: [PATCH] HOT-FIX: conserta bug introduzido em e400633985 --- sapl/base/forms.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sapl/base/forms.py b/sapl/base/forms.py index 3be1d29a7..951ac33e1 100644 --- a/sapl/base/forms.py +++ b/sapl/base/forms.py @@ -1498,8 +1498,12 @@ class ConfiguracoesAppForm(ModelForm): self.fields['cronometro_consideracoes'].widget.attrs['class'] = 'cronometro' def clean(self): - mostrar_brasao_painel = self.cleaned_data.get( - 'mostrar_brasao_painel', False) + cleaned_data = super().clean() + + if not self.is_valid(): + return cleaned_data + + mostrar_brasao_painel = self.cleaned_data.get('mostrar_brasao_painel', False) casa = CasaLegislativa.objects.first() if not casa: @@ -1512,7 +1516,7 @@ class ConfiguracoesAppForm(ModelForm): raise ValidationError("Não há logitipo configurado para esta " "Casa legislativa.") - return mostrar_brasao_painel + return cleaned_data class RecuperarSenhaForm(PasswordResetForm):