From f7947074238b38c67c90903597e980fbd148cc99 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Fri, 29 Apr 2016 15:34:08 -0300 Subject: [PATCH] =?UTF-8?q?Remove=20c=C3=B3digo=20n=C3=A3o=20usado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- materia/forms.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/materia/forms.py b/materia/forms.py index c420b7bf6..a1727770b 100644 --- a/materia/forms.py +++ b/materia/forms.py @@ -340,21 +340,6 @@ class NumeracaoForm(ModelForm): return self.cleaned_data - def save(self, commit=False): - numeracao = super(NumeracaoForm, self).save(commit) - try: - Numeracao.objects.get(materia=numeracao.materia, - tipo_materia=numeracao.tipo_materia, - ano_materia=numeracao.ano_materia, - numero_materia=numeracao.numero_materia) - except ObjectDoesNotExist: - numeracao.save() - else: - msg = _('Essa numeração já existe.') - raise ValidationError(msg) - - return numeracao - class AnexadaForm(ModelForm):