Browse Source

HOT-FIX: fixes #2686

pull/2647/head
Edward Ribeiro 6 years ago
committed by Leandro Roberto
parent
commit
8e3a681157
  1. 2
      sapl/materia/views.py

2
sapl/materia/views.py

@ -1987,7 +1987,7 @@ class DocumentoAcessorioEmLoteView(PermissionRequiredMixin, FilterView):
file_path = os.path.join(diretorio, file_path = os.path.join(diretorio,
request.FILES['arquivo'].name) request.FILES['arquivo'].name)
shutil.copy2(tmp_name, file_path) 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() doc.save()
os.remove(tmp_name) os.remove(tmp_name)

Loading…
Cancel
Save