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

jenkins at plone.org jenkins at plone.org
Sun Nov 2 13:06:03 UTC 2014


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

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


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

Repository: Products.CMFDiffTool
Branch: refs/heads/master
Date: 2014-11-01T18:37:12+01:00
Author: Simon Delcourt (sdelcourt) <delcourt.simon at gmail.com>
Commit: https://github.com/plone/Products.CMFDiffTool/commit/833955846291732010d5718835ed906ddbc5fa1f

Handle case of empty field defined by a behaviour schema.

Files changed:
M Products/CMFDiffTool/BaseDiff.py
M Products/CMFDiffTool/dexteritydiff.py

diff --git a/Products/CMFDiffTool/BaseDiff.py b/Products/CMFDiffTool/BaseDiff.py
index c1eb861..93a68bb 100644
--- a/Products/CMFDiffTool/BaseDiff.py
+++ b/Products/CMFDiffTool/BaseDiff.py
@@ -13,6 +13,8 @@
 from Products.CMFDiffTool.interfaces import IDifference
 from Products.CMFDiffTool import CMFDiffToolMessageFactory as _
 
+from plone.dexterity.interfaces import IDexterityContent
+
 
 class BaseDiff:
     """Basic diff type"""
@@ -70,7 +72,11 @@ def _getValue(ob, field, field_name, convert_to_str=True):
     # Check for the attribute without acquisition.  If it's there,
     # grab it *with* acquisition, so things like ComputedAttribute
     # will work
-    if field and hasattr(aq_base(ob), field):
+    if field_name and hasattr(aq_base(ob), field_name):
+        value = getattr(ob, field_name)
+    elif IDexterityContent.providedBy(ob):
+        return field.default
+    elif field and hasattr(aq_base(ob), field):
         value = getattr(ob, field)
     elif hasattr(aq_base(ob), 'getField'):
         # Archetypes with an adapter extended schema needs special handling
diff --git a/Products/CMFDiffTool/dexteritydiff.py b/Products/CMFDiffTool/dexteritydiff.py
index dc0f212..b5d7270 100644
--- a/Products/CMFDiffTool/dexteritydiff.py
+++ b/Products/CMFDiffTool/dexteritydiff.py
@@ -119,7 +119,7 @@ def _diff_field(self, obj1, obj2, field, schema_name):
         return diff_type(
             obj1,
             obj2,
-            field.getName(),
+            field,
             id1=self.id1,
             id2=self.id2,
             field_name=field.getName(),


Repository: Products.CMFDiffTool
Branch: refs/heads/master
Date: 2014-11-02T12:17:24Z
Author: Philip Bauer (pbauer) <bauer at starzel.de>
Commit: https://github.com/plone/Products.CMFDiffTool/commit/7b22ff8e88dd354b5cac7af6b8d0f48b08026ec4

Merge pull request #2 from plone/dexterity_behaviour_bug

Handle case of empty field defined by a behaviour schema.

Files changed:
M Products/CMFDiffTool/BaseDiff.py
M Products/CMFDiffTool/dexteritydiff.py

diff --git a/Products/CMFDiffTool/BaseDiff.py b/Products/CMFDiffTool/BaseDiff.py
index c1eb861..93a68bb 100644
--- a/Products/CMFDiffTool/BaseDiff.py
+++ b/Products/CMFDiffTool/BaseDiff.py
@@ -13,6 +13,8 @@
 from Products.CMFDiffTool.interfaces import IDifference
 from Products.CMFDiffTool import CMFDiffToolMessageFactory as _
 
+from plone.dexterity.interfaces import IDexterityContent
+
 
 class BaseDiff:
     """Basic diff type"""
@@ -70,7 +72,11 @@ def _getValue(ob, field, field_name, convert_to_str=True):
     # Check for the attribute without acquisition.  If it's there,
     # grab it *with* acquisition, so things like ComputedAttribute
     # will work
-    if field and hasattr(aq_base(ob), field):
+    if field_name and hasattr(aq_base(ob), field_name):
+        value = getattr(ob, field_name)
+    elif IDexterityContent.providedBy(ob):
+        return field.default
+    elif field and hasattr(aq_base(ob), field):
         value = getattr(ob, field)
     elif hasattr(aq_base(ob), 'getField'):
         # Archetypes with an adapter extended schema needs special handling
diff --git a/Products/CMFDiffTool/dexteritydiff.py b/Products/CMFDiffTool/dexteritydiff.py
index dc0f212..b5d7270 100644
--- a/Products/CMFDiffTool/dexteritydiff.py
+++ b/Products/CMFDiffTool/dexteritydiff.py
@@ -119,7 +119,7 @@ def _diff_field(self, obj1, obj2, field, schema_name):
         return diff_type(
             obj1,
             obj2,
-            field.getName(),
+            field,
             id1=self.id1,
             id2=self.id2,
             field_name=field.getName(),




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


More information about the Testbot mailing list