Skip to content

Commit

Permalink
Update admin.py
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleguido committed Nov 28, 2024
1 parent 26f6365 commit dabdebb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions miller/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ def thumbnail(self, instance):
return mark_safe("⚠️ attachment <b>not found</b>")
return ""
thumbnail = resolutions.get("thumbnail", {})
if not thumbnail:
return ""
return mark_safe(
'<img src="{url}" width="{width}" height="{height}" />'.format(**thumbnail)
)
Expand Down

0 comments on commit dabdebb

Please sign in to comment.