From 0b1495000fd6c8cebf37a7a75061377d868afb79 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Mon, 18 Jan 2016 11:27:10 -0200 Subject: [PATCH] =?UTF-8?q?Fix=20formul=C3=A1rio=20simplificado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- materia/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/materia/views.py b/materia/views.py index 18da2d9d4..9656d6e0a 100644 --- a/materia/views.py +++ b/materia/views.py @@ -387,7 +387,7 @@ class FormularioSimplificadoView(FormMixin, GenericView): template_name = "materia/formulario_simplificado.html" def get_success_url(self): - return reverse('formulario_simplificado') + return reverse('materialegislativa:list') def get(self, request, *args, **kwargs): form = FormularioSimplificadoForm() @@ -398,7 +398,7 @@ class FormularioSimplificadoView(FormMixin, GenericView): if form.is_valid: materia = form.save(commit=False) - if request.FILES['texto_original']: + if 'texto_original' in request.FILES: materia.texto_original = request.FILES['texto_original'] materia.save() return self.form_valid(form)