[CMF-checkins] CVS: CMF/CMFSetup - utils.py:1.24
Florent Guillaume
fg at nuxeo.com
Fri Jul 8 10:40:46 EDT 2005
Update of /cvs-repository/CMF/CMFSetup
In directory cvs.zope.org:/tmp/cvs-serv32762
Modified Files:
utils.py
Log Message:
Merge from 1.5 branch:
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.23 => 1.24 ===
--- CMF/CMFSetup/utils.py:1.23 Tue Jul 5 07:06:47 2005
+++ CMF/CMFSetup/utils.py Fri Jul 8 10:40:15 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