[Testbot] Plone 5.0 - Python 2.7 - Build # 1319 - Still failing! - 1 failure(s)

jenkins at plone.org jenkins at plone.org
Tue Jan 28 21:58:37 UTC 2014


This commit violated the Plone Continous Integration rule "Don’t Check In on a Broken Build": https://buildoutcoredev.readthedocs.org/en/latest/continous-integration.html#dont-check-in-on-a-broken-build

-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 1319 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-5.0-python-2.7/1319/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: plone.app.widgets
Branch: refs/heads/master
Date: 2014-01-28T13:00:17-08:00
Author: Nathan Van Gheem (vangheem) <vangheem at gmail.com>
Commit: https://github.com/plone/plone.app.widgets/commit/be8a29581743d905b1f6577f9ad61a9b4970ec6e

fix missing values on select2 widget

Files changed:
M plone/app/widgets/dx.py
M plone/app/widgets/tests/test_dx.py

diff --git a/plone/app/widgets/dx.py b/plone/app/widgets/dx.py
index e1f403d..85454ad 100644
--- a/plone/app/widgets/dx.py
+++ b/plone/app/widgets/dx.py
@@ -219,6 +219,8 @@ def toFieldValue(self, value):
                 value = value.split(separator)
             else:
                 return self.field.missing_value
+        elif value == (u'',):
+            return self.field.missing_value
         return super(SelectWidgetConverter, self).toFieldValue(value)
 
 
diff --git a/plone/app/widgets/tests/test_dx.py b/plone/app/widgets/tests/test_dx.py
index 1b4de95..8480a77 100644
--- a/plone/app/widgets/tests/test_dx.py
+++ b/plone/app/widgets/tests/test_dx.py
@@ -546,6 +546,23 @@ def test_data_converter_tuple(self):
             ['one', 'two', 'three'],
         )
 
+    def test_data_converter_handles_empty_value(self):
+        from plone.app.widgets.dx import SelectWidget
+        from plone.app.widgets.dx import SelectWidgetConverter
+
+        field = Tuple(__name__='tuplefield',
+                      value_type=Choice(__name__='selectfield',
+                                        values=['one', 'two', 'three']))
+        widget = SelectWidget(self.request)
+        widget.field = field
+        widget.multiple = True
+        converter = SelectWidgetConverter(field, widget)
+
+        self.assertEqual(
+            converter.toFieldValue((u'',)),
+            field.missing_value,
+        )
+
 
 class AjaxSelectWidgetTests(unittest.TestCase):
 




-------------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 1842 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140128/f769fed2/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 131993 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140128/f769fed2/attachment-0003.obj>


More information about the Testbot mailing list