Include storage path in exporter + tests

This commit is contained in:
Michael Shamoon authored and Trenton Holmes committed 2022-09-11 07:39:35 -07:00
1 parent 962d0ebb40
commit 15d074d39c
2 files changed
+13 -3

No files matched your search

@@ -18,6 +18,7 @@ from documents.models import Document
from documents.models import DocumentType
from documents.models import SavedView
from documents.models import SavedViewFilterRule
from documents.models import StoragePath
from documents.models import Tag
from documents.models import UiSettings
from documents.settings import EXPORTER_ARCHIVE_NAME
@@ -114,8 +115,8 @@ class Command(BaseCommand):
map(lambda f: os.path.abspath(os.path.join(root, f)), files),
)
# 2. Create manifest, containing all correspondents, types, tags,
# documents and ui_settings
# 2. Create manifest, containing all correspondents, types, tags, storage paths
# comments, documents and ui_settings
with transaction.atomic():
manifest = json.loads(
serializers.serialize("json", Correspondent.objects.all()),
@@ -127,6 +128,10 @@ class Command(BaseCommand):
serializers.serialize("json", DocumentType.objects.all()),
)
manifest += json.loads(
serializers.serialize("json", StoragePath.objects.all()),
)
manifest += json.loads(
serializers.serialize("json", Comment.objects.all()),
)