From 68652c8c3754e82f21d60a13cf6b50681e20a6d1 Mon Sep 17 00:00:00 2001 From: Jonas Winkler Date: Tue, 4 Sep 2018 14:55:29 +0200 Subject: [PATCH] Document Type exporting --- src/documents/management/commands/document_exporter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/documents/management/commands/document_exporter.py 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)