mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-17 03:56:31 +01:00
create documents subfolder folder if they do not exist
This commit is contained in:
parent
e293f70a91
commit
d1aa54caa9
1 changed files with 3 additions and 0 deletions
|
|
@ -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"}:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue