diff --git a/apps/documents/staging.py b/apps/documents/staging.py index 076a346414..5230d25d64 100644 --- a/apps/documents/staging.py +++ b/apps/documents/staging.py @@ -11,7 +11,7 @@ from models import Document, get_filename_from_uuid def get_all_files(): - return sorted([os.path.normcase(f) for f in os.listdir(STAGING_DIRECTORY)]) + return sorted([os.path.normcase(f) for f in os.listdir(STAGING_DIRECTORY) if os.path.isfile(os.path.join(STAGING_DIRECTORY, f))]) class StagingFile(object):