From fcfef3edaca8b45e03478554d8e74b431e6b27ca Mon Sep 17 00:00:00 2001 From: Daniele Guido Date: Thu, 28 Nov 2024 18:40:02 +0100 Subject: [PATCH] Update admin.py --- miller/admin.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/miller/admin.py b/miller/admin.py index 48b9a50..99a3a14 100644 --- a/miller/admin.py +++ b/miller/admin.py @@ -179,11 +179,12 @@ def thumbnail(self, instance): return mark_safe("⚠️ attachment not found") return "" thumbnail = resolutions.get("thumbnail", {}) - if not thumbnail: + url = thumbnail.get("url", "") + width = thumbnail.get("width", 0) + height = thumbnail.get("height", 0) + if not url: return "" - return mark_safe( - ''.format(**thumbnail) - ) + return mark_safe(f'') thumbnail.__name__ = "Thumbnail"