Permalink
Browse files

try/except for image thumnail on plugin

  • Loading branch information...
1 parent 4e1122c commit 01f6f7ba78f4e12cf0aabd6c382bf454c4479af6 @evildmp committed Jan 5, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 arkestra_image_plugin/cms_plugins.py
@@ -443,7 +443,10 @@ def __unicode__(self):
def icon_src(self, instance):
# print instance.kind
if instance.imageset_item.count() == 1:
- return instance.imageset_item.all()[0].image.thumbnails['admin_tiny_icon']
+ try:
+ return instance.imageset_item.all()[0].image.thumbnails['admin_tiny_icon']
+ except KeyError:
+ pass
elif instance.kind == "basic":
return "/static/plugin_icons/imageset_basic.png"
elif instance.kind == "lightbox-single":

0 comments on commit 01f6f7b

Please sign in to comment.