From f2a89988f7fc574dcbdb2433c0067995f593d863 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(+) 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