mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-17 10:13:56 -05:00
Add ui_settings to exporter
This commit is contained in:
parent
fb10d3a5be
commit
0225faddbb
@ -18,6 +18,7 @@ from documents.models import DocumentType
|
|||||||
from documents.models import SavedView
|
from documents.models import SavedView
|
||||||
from documents.models import SavedViewFilterRule
|
from documents.models import SavedViewFilterRule
|
||||||
from documents.models import Tag
|
from documents.models import Tag
|
||||||
|
from documents.models import UiSettings
|
||||||
from documents.settings import EXPORTER_ARCHIVE_NAME
|
from documents.settings import EXPORTER_ARCHIVE_NAME
|
||||||
from documents.settings import EXPORTER_FILE_NAME
|
from documents.settings import EXPORTER_FILE_NAME
|
||||||
from documents.settings import EXPORTER_THUMBNAIL_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),
|
map(lambda f: os.path.abspath(os.path.join(root, f)), files),
|
||||||
)
|
)
|
||||||
|
|
||||||
# 2. Create manifest, containing all correspondents, types, tags and
|
# 2. Create manifest, containing all correspondents, types, tags,
|
||||||
# documents
|
# documents and ui_settings
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
manifest = json.loads(
|
manifest = json.loads(
|
||||||
serializers.serialize("json", Correspondent.objects.all()),
|
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", User.objects.all()))
|
||||||
|
|
||||||
|
manifest += json.loads(
|
||||||
|
serializers.serialize("json", UiSettings.objects.all()),
|
||||||
|
)
|
||||||
|
|
||||||
# 3. Export files from each document
|
# 3. Export files from each document
|
||||||
for index, document_dict in tqdm.tqdm(
|
for index, document_dict in tqdm.tqdm(
|
||||||
enumerate(document_manifest),
|
enumerate(document_manifest),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user