diff --git a/sapl/materia/views.py b/sapl/materia/views.py index 4541c9c07..d396e6545 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -1277,6 +1277,7 @@ class DocumentoAcessorioEmLoteView(PermissionRequiredMixin, FilterView): return self.get(request, self.kwargs) tipo = TipoDocumento.objects.get(descricao=request.POST['tipo']) + for materia_id in marcadas: DocumentoAcessorio.objects.create( materia_id=materia_id, @@ -1284,7 +1285,7 @@ class DocumentoAcessorioEmLoteView(PermissionRequiredMixin, FilterView): arquivo=request.POST['arquivo'], nome=request.POST['nome'], data=datetime.strptime(request.POST['data'], "%d/%m/%Y"), - autor=request.POST['autor'], + autor=Autor.objects.get(id=request.POST['autor']), ementa=request.POST['ementa'] ) msg = _('Documento(s) criado(s).') diff --git a/sapl/templates/materia/acessorio_lote.html b/sapl/templates/materia/acessorio_lote.html index 77adfb4e4..5b4528bca 100644 --- a/sapl/templates/materia/acessorio_lote.html +++ b/sapl/templates/materia/acessorio_lote.html @@ -43,8 +43,20 @@
- - + + +
+ + + +
+
+
+