mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 19:17:13 -05:00 
			
		
		
		
	create documents subfolder folder if they do not exist
This commit is contained in:
		
							parent
							
								
									e293f70a91
								
							
						
					
					
						commit
						d1aa54caa9
					
				@ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user