diff --git a/rapids/tables.py b/rapids/tables.py index 306f2627..edcebe21 100755 --- a/rapids/tables.py +++ b/rapids/tables.py @@ -12,7 +12,12 @@ from easy_thumbnails.exceptions import InvalidImageFormatError class ImageColumn(tables.Column): def render(self, value): - image_object = value.first().image + obj = value.first() + + if obj is None: + return format_html('No image') + + image_object = obj.image try: thumbnailer = get_thumbnailer(image_object) return format_html('', thumbnailer["exam-list"])