Merge pull request #250 from brightdroid/master

create documents subfolder folder if they do not exist
This commit is contained in:
Daniel Quinn 2017-08-12 14:39:22 +01:00 committed by GitHub
commit a05644fc31

View File

@ -38,6 +38,9 @@ class GnuPG(object):
def move_documents_and_create_thumbnails(apps, schema_editor):
os.makedirs(os.path.join(settings.MEDIA_ROOT, "documents", "originals"), exist_ok=True)
os.makedirs(os.path.join(settings.MEDIA_ROOT, "documents", "thumbnails"), exist_ok=True)
documents = os.listdir(os.path.join(settings.MEDIA_ROOT, "documents"))
if set(documents) == {"originals", "thumbnails"}: