summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-02-02 13:30:59 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2020-02-02 13:30:59 +0100
commitf2a89988f7fc574dcbdb2433c0067995f593d863 (patch)
tree6f1166ae80423c8fe3f3df9cafd713e30803d618 /ishtar_common/models.py
parent254b457cf20d21aa80ed2761f88909ca4c83f67f (diff)
downloadIshtar-f2a89988f7fc574dcbdb2433c0067995f593d863.tar.bz2
Ishtar-f2a89988f7fc574dcbdb2433c0067995f593d863.zip
Template: add thumbnail image
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 28ffcf7b2..eff43a119 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -5346,6 +5346,12 @@ class Document(BaseHistorizedItem, QRCodeItem, OwnPerms, ImageModel,
}
@property
+ def thumbnail_path(self):
+ if not self.thumbnail:
+ return ""
+ return self.thumbnail.path
+
+ @property
def image_path(self):
if not self.image:
return ""