mirror of
https://github.com/Hopiu/django-imagekit.git
synced 2026-04-07 23:20:59 +00:00
admin_thumbnail_view no longer crashes when there is no file found
This commit is contained in:
parent
e0a2ad9ede
commit
e03edf8e83
1 changed files with 2 additions and 0 deletions
|
|
@ -78,6 +78,8 @@ class ImageModel(models.Model):
|
|||
return 'An "%s" image spec has not been defined.' % \
|
||||
self._ik.admin_thumbnail_spec
|
||||
else:
|
||||
if not prop._exists():
|
||||
return None
|
||||
if hasattr(self, 'get_absolute_url'):
|
||||
return u'<a href="%s"><img src="%s"></a>' % \
|
||||
(self.get_absolute_url(), prop.url)
|
||||
|
|
|
|||
Loading…
Reference in a new issue