[Checkins] SVN: z3c.form/trunk/ applyChanges should not try to compare old and new values of the old value can not be accessed.

Wichert Akkerman wichert at wiggy.net
Mon May 10 10:59:34 EDT 2010


Log message for revision 112224:
  applyChanges should not try to compare old and new values of the old value can not be accessed.

Changed:
  U   z3c.form/trunk/CHANGES.txt
  U   z3c.form/trunk/src/z3c/form/form.py

-=-
Modified: z3c.form/trunk/CHANGES.txt
===================================================================
--- z3c.form/trunk/CHANGES.txt	2010-05-10 14:30:38 UTC (rev 112223)
+++ z3c.form/trunk/CHANGES.txt	2010-05-10 14:59:34 UTC (rev 112224)
@@ -5,6 +5,8 @@
 2.3.4 (unreleased)
 ------------------
 
+- Bugfix: applyChanges should not try to compare old and new values of the old
+  value can not be accessed.
 
 2.3.3 (2010-04-20)
 ------------------

Modified: z3c.form/trunk/src/z3c/form/form.py
===================================================================
--- z3c.form/trunk/src/z3c/form/form.py	2010-05-10 14:30:38 UTC (rev 112223)
+++ z3c.form/trunk/src/z3c/form/form.py	2010-05-10 14:59:34 UTC (rev 112224)
@@ -45,7 +45,7 @@
             (content, field.field), interfaces.IDataManager)
         # Only update the data, if it is different
         # Or it is an Object, in case we'll never know
-        if (dm.get() != data[name]
+        if ((dm.canAccess() and dm.get() != data[name])
             or zope.schema.interfaces.IObject.providedBy(field.field)):
             dm.set(data[name])
             # Record the change using information required later



More information about the checkins mailing list