show preview

This commit is contained in:
j 2025-02-26 16:42:03 +01:00
parent 347433ceb6
commit 0494fd40cf

View file

@ -242,7 +242,7 @@ class Item(models.Model):
def preview(self):
from django.utils.html import escape, mark_safe
if "thumbnail" in self.data:
if self.data.get("thumbnail"):
return mark_safe('<img src="%s" style="max-width:100%%" />' % escape(self.data["thumbnail"]))
return ""