[CMF-checkins] CVS: CMF/CMFSetup - utils.py:1.13.2.10
Florent Guillaume
fg at nuxeo.com
Fri Jul 8 10:38:48 EDT 2005
Update of /cvs-repository/CMF/CMFSetup
In directory cvs.zope.org:/tmp/cvs-serv31421
Modified Files:
Tag: CMF-1_5-branch
utils.py
Log Message:
Make sure a '0' boolean is imported as False.
A '0' boolean can occur if a boolean property containing 0 is exported.
=== CMF/CMFSetup/utils.py 1.13.2.9 => 1.13.2.10 ===
--- CMF/CMFSetup/utils.py:1.13.2.9 Tue Jul 5 07:03:37 2005
+++ CMF/CMFSetup/utils.py Fri Jul 8 10:38:17 2005
@@ -295,6 +295,11 @@
if prop_map.get('type') == 'multiple selection':
prop_value = p_info['elements'] or ()
+ elif prop_map.get('type') == 'boolean':
+ # Make sure '0' is imported as False
+ prop_value = str(p_info['value'])
+ if prop_value == '0':
+ prop_value = ''
else:
# if we pass a *string* to _updateProperty, all other values
# are converted to the right type
More information about the CMF-checkins
mailing list