Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Add ui_settings to exporter

Michael Shamoon0225faddbba5
diff --git a/src/documents/management/commands/document_exporter.py b/src/documents/management/commands/document_exporter.py
index 27f1fd8a9..4bddd51b8 100644
--- a/src/documents/management/commands/document_exporter.py
+++ b/src/documents/management/commands/document_exporter.py
@@ -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),