mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	create documents subfolder folder if they do not exist
This commit is contained in:
		| @@ -38,6 +38,9 @@ class GnuPG(object): | |||||||
|  |  | ||||||
| def move_documents_and_create_thumbnails(apps, schema_editor): | 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")) |     documents = os.listdir(os.path.join(settings.MEDIA_ROOT, "documents")) | ||||||
|  |  | ||||||
|     if set(documents) == {"originals", "thumbnails"}: |     if set(documents) == {"originals", "thumbnails"}: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Christoph Roeder
					Christoph Roeder