diff options
| 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 |
| commit | 7ecf3a43ec1f02de2a54345848c808367f65299c (patch) | |
| tree | 6f1166ae80423c8fe3f3df9cafd713e30803d618 /ishtar_common/models.py | |
| parent | 9bc3245cba1a1fd5f0ff844fbf53eef3351d670f (diff) | |
| download | Ishtar-7ecf3a43ec1f02de2a54345848c808367f65299c.tar.bz2 Ishtar-7ecf3a43ec1f02de2a54345848c808367f65299c.zip | |
Template: add thumbnail image
Diffstat (limited to 'ishtar_common/models.py')
| -rw-r--r-- | ishtar_common/models.py | 6 |
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 "" |
