Commit 61bcc04c authored by Yoshinori Okuji's avatar Yoshinori Okuji

Return an empty string if the URL is None. This happens usually when an image is not uploaded yet.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26632 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a743cdca
......@@ -75,6 +75,8 @@ class ImageFieldWidget(Widget.TextWidget):
"""Render image field as a link to the image
"""
# Url is already defined in value
if value is None:
return ''
image = value
alt = field.get_value('description') or \
field.get_value('title')
......
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