mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Add ui_settings to exporter
This commit is contained in:
		@@ -18,6 +18,7 @@ from documents.models import DocumentType
 | 
			
		||||
from documents.models import SavedView
 | 
			
		||||
from documents.models import SavedViewFilterRule
 | 
			
		||||
from documents.models import Tag
 | 
			
		||||
from documents.models import UiSettings
 | 
			
		||||
from documents.settings import EXPORTER_ARCHIVE_NAME
 | 
			
		||||
from documents.settings import EXPORTER_FILE_NAME
 | 
			
		||||
from documents.settings import EXPORTER_THUMBNAIL_NAME
 | 
			
		||||
@@ -112,8 +113,8 @@ class Command(BaseCommand):
 | 
			
		||||
                map(lambda f: os.path.abspath(os.path.join(root, f)), files),
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
        # 2. Create manifest, containing all correspondents, types, tags and
 | 
			
		||||
        # documents
 | 
			
		||||
        # 2. Create manifest, containing all correspondents, types, tags,
 | 
			
		||||
        # documents and ui_settings
 | 
			
		||||
        with transaction.atomic():
 | 
			
		||||
            manifest = json.loads(
 | 
			
		||||
                serializers.serialize("json", Correspondent.objects.all()),
 | 
			
		||||
@@ -150,6 +151,10 @@ class Command(BaseCommand):
 | 
			
		||||
 | 
			
		||||
            manifest += json.loads(serializers.serialize("json", User.objects.all()))
 | 
			
		||||
 | 
			
		||||
            manifest += json.loads(
 | 
			
		||||
                serializers.serialize("json", UiSettings.objects.all()),
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
        # 3. Export files from each document
 | 
			
		||||
        for index, document_dict in tqdm.tqdm(
 | 
			
		||||
            enumerate(document_manifest),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user