mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 19:17:13 -05:00 
			
		
		
		
	Merge branch 'document-type' into dev
This commit is contained in:
		
						commit
						8a1a736340
					
				
							
								
								
									
										5
									
								
								src/documents/management/commands/document_exporter.py
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										5
									
								
								src/documents/management/commands/document_exporter.py
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@ -6,7 +6,7 @@ import shutil
 | 
				
			|||||||
from django.core.management.base import BaseCommand, CommandError
 | 
					from django.core.management.base import BaseCommand, CommandError
 | 
				
			||||||
from django.core import serializers
 | 
					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 paperless.db import GnuPG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from ...mixins import Renderable
 | 
					from ...mixins import Renderable
 | 
				
			||||||
@ -91,6 +91,9 @@ class Command(Renderable, BaseCommand):
 | 
				
			|||||||
        manifest += json.loads(serializers.serialize(
 | 
					        manifest += json.loads(serializers.serialize(
 | 
				
			||||||
            "json", Tag.objects.all()))
 | 
					            "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:
 | 
					        with open(os.path.join(self.target, "manifest.json"), "w") as f:
 | 
				
			||||||
            json.dump(manifest, f, indent=2)
 | 
					            json.dump(manifest, f, indent=2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user