diff --git a/src/documents/migrations/0012_auto_20160305_0040.py b/src/documents/migrations/0012_auto_20160305_0040.py index 91d384c22..5168c9206 100644 --- a/src/documents/migrations/0012_auto_20160305_0040.py +++ b/src/documents/migrations/0012_auto_20160305_0040.py @@ -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"}: