[z3-five] Five release fest: 1.2.4, 1.3.5, 1.4c and 1.5b released!
Philipp von Weitershausen
philipp at weitershausen.de
Thu May 4 20:03:50 CEST 2006
Hi Nikolay,
> it happens when browser:editform is used with "for" and "schema"
> attributes and object support schema with adapter.
>
> Index: form/__init__.py
> ===================================================================
> --- form/__init__.py (revision 67959)
> +++ form/__init__.py (working copy)
> @@ -19,6 +19,7 @@
> from datetime import datetime
>
> import Acquisition
> +from Acquisition import aq_base
> import transaction
> from zope.event import notify
> from zope.schema.interfaces import ValidationError
> @@ -63,7 +64,7 @@
>
> def _setUpWidgets(self):
> adapted = self.schema(self.context)
> - if adapted is not self.context:
> + if aq_base(adapted) is not aq_base(self.context):
> if not ILocation.providedBy(adapted):
> adapted = LocationProxy(adapted)
> adapted.__parent__ = self.context
>
>
Thanks for the patch. Can you please also create a test that exercises
this code and include it in the patch?
Thank you
Philipp
More information about the z3-five
mailing list