From af9603972587a7c01ed182d422693d94f81d25f3 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Tue, 23 May 2017 15:50:47 -0300 Subject: [PATCH] Conserta DocumentoAcessorioEmLote --- sapl/materia/views.py | 2 +- sapl/templates/materia/em_lote/acessorio.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sapl/materia/views.py b/sapl/materia/views.py index 2af41db6d..f0c95f330 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -1616,7 +1616,7 @@ class DocumentoAcessorioEmLoteView(PermissionRequiredMixin, FilterView): doc = DocumentoAcessorio() doc.materia_id = materia_id doc.tipo = tipo - doc.arquivo = request.POST['arquivo'] + doc.arquivo = request.FILES['arquivo'] doc.nome = request.POST['nome'] doc.data = datetime.strptime(request.POST['data'], "%d/%m/%Y") doc.autor_id = request.POST['autor'] diff --git a/sapl/templates/materia/em_lote/acessorio.html b/sapl/templates/materia/em_lote/acessorio.html index 1fe8086cc..a4b09d796 100644 --- a/sapl/templates/materia/em_lote/acessorio.html +++ b/sapl/templates/materia/em_lote/acessorio.html @@ -14,7 +14,7 @@ {% else %}

{% blocktrans with object_list.count as total_materias %}Foram encontradas {{total_materias}} matérias.{% endblocktrans %}

{% endif %} -
+ {% csrf_token %}
Documento Acessório @@ -42,7 +42,7 @@ - +