mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-16 03:26:50 +01:00
Fix: export consumption templates & custom fields in exporter (#4825)
This commit is contained in:
parent
a58e8498aa
commit
90f90dc9b4
3 changed files with 40 additions and 1 deletions
|
|
@ -23,7 +23,10 @@ from guardian.models import UserObjectPermission
|
|||
|
||||
from documents.file_handling import delete_empty_directories
|
||||
from documents.file_handling import generate_filename
|
||||
from documents.models import ConsumptionTemplate
|
||||
from documents.models import Correspondent
|
||||
from documents.models import CustomField
|
||||
from documents.models import CustomFieldInstance
|
||||
from documents.models import Document
|
||||
from documents.models import DocumentType
|
||||
from documents.models import Note
|
||||
|
|
@ -292,6 +295,19 @@ class Command(BaseCommand):
|
|||
serializers.serialize("json", GroupObjectPermission.objects.all()),
|
||||
)
|
||||
|
||||
manifest += json.loads(
|
||||
serializers.serialize("json", ConsumptionTemplate.objects.all()),
|
||||
)
|
||||
|
||||
manifest += json.loads(
|
||||
serializers.serialize("json", CustomField.objects.all()),
|
||||
)
|
||||
|
||||
if not self.split_manifest:
|
||||
manifest += json.loads(
|
||||
serializers.serialize("json", CustomFieldInstance.objects.all()),
|
||||
)
|
||||
|
||||
# 3. Export files from each document
|
||||
for index, document_dict in tqdm.tqdm(
|
||||
enumerate(document_manifest),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue