Commit ba8f7d93 authored by fred's avatar fred
Browse files

thumbnail to a pixel in case of unset image

parent 2f501534
......@@ -17,7 +17,7 @@ def thumbnail(image, size='100x100'):
# defining the filename and the miniature filename
filehead, filetail = os.path.split(image.path)
except ValueError:
except (AttributeError, ValueError):
# return transparent pixel if the image doesn't actually exist
basename, format = os.path.splitext(filetail)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment