From 7ecf3a43ec1f02de2a54345848c808367f65299c Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 2 Feb 2020 13:30:59 +0100 Subject: Template: add thumbnail image --- ishtar_common/models.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ishtar_common/models.py') 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 @@ -5345,6 +5345,12 @@ class Document(BaseHistorizedItem, QRCodeItem, OwnPerms, ImageModel, "thumbnail": thumbnail, } + @property + def thumbnail_path(self): + if not self.thumbnail: + return "" + return self.thumbnail.path + @property def image_path(self): if not self.image: -- cgit v1.2.3