From 959d66f804124a6b1e5b736362e1b3ead9304358 Mon Sep 17 00:00:00 2001 From: Victor Fabre Date: Tue, 25 Sep 2018 15:39:45 -0300 Subject: [PATCH] Fix #2245 (#2256) --- sapl/parlamentares/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sapl/parlamentares/forms.py b/sapl/parlamentares/forms.py index 94ab7b169..207bc2bc7 100644 --- a/sapl/parlamentares/forms.py +++ b/sapl/parlamentares/forms.py @@ -348,12 +348,12 @@ class FrenteForm(ModelForm): fields = '__all__' def clean(self): - frente = super(FrenteForm, self).clean() + super(FrenteForm, self).clean() cd = self.cleaned_data if not self.is_valid(): return self.cleaned_data - if cd['data_criacao'] >= cd['data_extincao']: + if cd['data_extincao'] and cd['data_criacao'] >= cd['data_extincao']: raise ValidationError(_("Data Dissolução não pode ser anterior a Data Criação")) return cd