[Checkins] SVN: z3c.form/trunk/src/z3c/form/datamanager.py added comment about broken IDataManager adaption for inherited schema fields
Roger Ineichen
cvs-admin at zope.org
Sun Oct 7 16:20:41 UTC 2012
Log message for revision 127928:
added comment about broken IDataManager adaption for inherited schema fields
Changed:
U z3c.form/trunk/src/z3c/form/datamanager.py
-=-
Modified: z3c.form/trunk/src/z3c/form/datamanager.py
===================================================================
--- z3c.form/trunk/src/z3c/form/datamanager.py 2012-10-06 18:28:58 UTC (rev 127927)
+++ z3c.form/trunk/src/z3c/form/datamanager.py 2012-10-07 16:20:37 UTC (rev 127928)
@@ -55,6 +55,13 @@
def adapted_context(self):
# get the right adapter or context
context = self.context
+ # NOTE: zope.schema fields defined in inherited interfaces will point
+ # to the inherited interface. This could end in adapting the wrong item.
+ # This is very bad because the widget field offers an explicit interface
+ # argument which doesn't get used in Widget setup during IDataManager
+ # lookup. We should find a concept which allows to adapt the
+ # IDataManager use the widget field interface instead of the zope.schema
+ # field.interface, ri
if self.field.interface is not None:
context = self.field.interface(context)
return context
More information about the checkins
mailing list