Add metadata field: has archive version

This commit is contained in:
Jonas Winkler 2020-11-25 17:18:57 +01:00
parent af99cbccd9
commit cb9e5b5ee3

View File

@ -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()