Skip to content

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

Document Type exporting

Jonas Winkler68652c8c3754
diff --git a/src/documents/management/commands/document_exporter.py b/src/documents/management/commands/document_exporter.py
old mode 100644
new mode 100755
index fce09092c..d1a9df380
--- a/src/documents/management/commands/document_exporter.py
+++ b/src/documents/management/commands/document_exporter.py
@@ -6,7 +6,7 @@ import shutil
from django.core.management.base import BaseCommand, CommandError
from django.core import serializers
-from documents.models import Document, Correspondent, Tag
+from documents.models import Document, Correspondent, Tag, DocumentType
from paperless.db import GnuPG
from ...mixins import Renderable
@@ -91,6 +91,9 @@ class Command(Renderable, BaseCommand):
manifest += json.loads(serializers.serialize(
"json", Tag.objects.all()))
+ manifest += json.loads(serializers.serialize(
+ "json", DocumentType.objects.all()))
+
with open(os.path.join(self.target, "manifest.json"), "w") as f:
json.dump(manifest, f, indent=2)