tidy up table image dlocks
This commit is contained in:
+2
-1
@@ -194,6 +194,7 @@ class SeriesBase(models.Model):
|
||||
else:
|
||||
# This is a mess...
|
||||
return format_html('", "'.join(images))
|
||||
|
||||
def get_thumbnail(self):
|
||||
images = self.images.all()
|
||||
|
||||
@@ -205,7 +206,7 @@ class SeriesBase(models.Model):
|
||||
thumbnailer = get_thumbnailer(img)
|
||||
thumbnail = thumbnailer["exam-list"]
|
||||
except InvalidImageFormatError:
|
||||
return format_html('<span title="{}">Invalid image url<span>', img), len(
|
||||
return format_html('<img title="{}" src="/static/not-found-image.jpg" />', img), len(
|
||||
images
|
||||
)
|
||||
return format_html('<img src="/media/{}" />', thumbnail), len(images)
|
||||
|
||||
Reference in New Issue
Block a user