This commit is contained in:
Roberto Rosario
2014-10-27 22:51:25 -04:00
parent 9d408d5795
commit 3da11a023b
2 changed files with 3 additions and 6 deletions

View File

@@ -5,7 +5,6 @@ from django.core.files import File
from mayan.celery import app
from documents.exceptions import NewDocumentVersionNotAllowed
from documents.models import Document, DocumentType
from .models import Source

View File

@@ -5,19 +5,17 @@ import tempfile
from django.conf import settings
from django.contrib import messages
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse, reverse_lazy
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext
from django.utils.http import urlencode
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext
from django.utils.translation import ugettext_lazy as _
from acls.models import AccessEntry
from common.utils import encapsulate
from common.views import MultiFormView
from documents.exceptions import NewDocumentVersionNotAllowed
from documents.models import DocumentType, Document
from documents.permissions import (PERMISSION_DOCUMENT_CREATE,
PERMISSION_DOCUMENT_NEW_VERSION)
@@ -126,7 +124,7 @@ class UploadBaseView(MultiFormView):
try:
staging_filelist = list(self.source.get_files())
except Exception as exception:
messages.error(request, exception)
messages.error(self.request, exception)
staging_filelist = []
finally:
subtemplates_list = [
@@ -220,7 +218,7 @@ class UploadInteractiveView(UploadBaseView):
task_upload_document.apply_async(kwargs=dict(
source_id=self.source.pk,
file_path=temporary_file.name,
label=file_object.name,
label=label or file_object.name,
document_type_id=self.document_type.pk,
expand=expand,
metadata_dict_list=decode_metadata_from_url(self.request.GET),