From ddb9e8d80bfbbe7744e8d4433708829203655edb Mon Sep 17 00:00:00 2001 From: Gilson Filho Date: Fri, 2 Dec 2011 14:49:16 +0000 Subject: [PATCH] Corringindo o if --- sigi/apps/servidores/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sigi/apps/servidores/forms.py b/sigi/apps/servidores/forms.py index cb5f753..0676a13 100644 --- a/sigi/apps/servidores/forms.py +++ b/sigi/apps/servidores/forms.py @@ -47,7 +47,7 @@ class FuncaoForm(forms.ModelForm): servidor = Servidor.objects.get(nome_completo=data.get('servidor')) if len(servidor.funcao_set.all()) > 1: funcao_anterior = servidor.funcao_set.all()[1] - else: + elif len(servidor.funcao_set.all()) == 1: funcao_anterior = servidor.funcao_set.all()[0] if valida_periodo_data(funcao_anterior.inicio_funcao,