From 84b56a37eccf42860916a30850e501baa8ab641e Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Thu, 4 Apr 2019 15:39:29 -0300 Subject: [PATCH] HOT-FIX: fixes #2686 --- sapl/materia/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapl/materia/views.py b/sapl/materia/views.py index 73dcb3072..e30b756fb 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -1987,7 +1987,7 @@ class DocumentoAcessorioEmLoteView(PermissionRequiredMixin, FilterView): file_path = os.path.join(diretorio, request.FILES['arquivo'].name) shutil.copy2(tmp_name, file_path) - doc.arquivo.name = file_path.split(MEDIA_ROOT)[1] # Retira MEDIA_ROOT do nome + doc.arquivo.name = file_path.split(MEDIA_ROOT + "/")[1] # Retira MEDIA_ROOT do nome doc.save() os.remove(tmp_name)