From cb9e5b5ee39f5c8ef7084e8436ad993815ebeb6b Mon Sep 17 00:00:00 2001 From: Jonas Winkler Date: Wed, 25 Nov 2020 17:18:57 +0100 Subject: [PATCH] Add metadata field: has archive version --- src/documents/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/documents/views.py b/src/documents/views.py index 4d62ae5c4..381eba3e1 100755 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -169,6 +169,7 @@ 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) }) except Document.DoesNotExist: raise Http404()