A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
codestyle
Jonas Winkler81aaadb2a396
diff --git a/src/documents/views.py b/src/documents/views.pyindex 381eba3e1..87d1d31b1 100755--- a/src/documents/views.py+++ b/src/documents/views.py@@ -138,7 +138,7 @@ class DocumentViewSet(RetrieveModelMixin,def file_response(self, pk, request, disposition):doc = Document.objects.get(id=pk)mime_type = doc.mime_type- if not self.original_requested(request) and os.path.isfile(doc.archive_path):+ if not self.original_requested(request) and os.path.isfile(doc.archive_path): # NOQA: E501file_handle = doc.archive_filemime_type = 'application/pdf'elif doc.storage_type == Document.STORAGE_TYPE_UNENCRYPTED:@@ -169,7 +169,8 @@ class DocumentViewSet(RetrieveModelMixin,"paperless__checksum": doc.checksum,"paperless__mime_type": doc.mime_type,"paperless__filename": doc.filename,- "paperless__has_archive_version": os.path.isfile(doc.archive_path)+ "paperless__has_archive_version":+ os.path.isfile(doc.archive_path)})except Document.DoesNotExist:raise Http404()