[Erp5-report] r26632 - /erp5/trunk/products/ERP5Form/ImageField.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Apr 25 12:04:25 CEST 2009
Author: yo
Date: Sat Apr 25 12:04:23 2009
New Revision: 26632
URL: http://svn.erp5.org?rev=26632&view=rev
Log:
Return an empty string if the URL is None. This happens usually when an image is not uploaded yet.
Modified:
erp5/trunk/products/ERP5Form/ImageField.py
Modified: erp5/trunk/products/ERP5Form/ImageField.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ImageField.py?rev=26632&r1=26631&r2=26632&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ImageField.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/ImageField.py [utf8] Sat Apr 25 12:04:23 2009
@@ -75,6 +75,8 @@
"""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')
More information about the Erp5-report
mailing list