GnuPG for archive file.

This commit is contained in:
Jonas Winkler
2020-11-25 20:16:27 +01:00
parent f51d2be303
commit 6f30ceea38
3 changed files with 9 additions and 6 deletions

View File

@@ -227,6 +227,8 @@ class Document(models.Model):
@property
def archive_path(self):
fname = "{:07}{}".format(self.pk, ".pdf")
if self.storage_type == self.STORAGE_TYPE_GPG:
fname += ".gpg"
return os.path.join(
settings.ARCHIVE_DIR,