[Checkins] SVN: five.pt/trunk/ Fixed an issue where the acquisition-chain would contain two template objects.
Malthe Borch
mborch at gmail.com
Mon Aug 30 08:43:55 EDT 2010
Log message for revision 116031:
Fixed an issue where the acquisition-chain would contain two template objects.
Changed:
U five.pt/trunk/CHANGES.txt
U five.pt/trunk/src/five/pt/patches.py
-=-
Modified: five.pt/trunk/CHANGES.txt
===================================================================
--- five.pt/trunk/CHANGES.txt 2010-08-30 12:10:28 UTC (rev 116030)
+++ five.pt/trunk/CHANGES.txt 2010-08-30 12:43:54 UTC (rev 116031)
@@ -3,9 +3,9 @@
In next release...
-- ...
+- Fixed acquisition-wrapping issue: we need to wrap with the parent to
+ avoid a pair of template objects (original and patched).
-
1.1 - 2010-05-15
~~~~~~~~~~~~~~~~~
Modified: five.pt/trunk/src/five/pt/patches.py
===================================================================
--- five.pt/trunk/src/five/pt/patches.py 2010-08-30 12:10:28 UTC (rev 116030)
+++ five.pt/trunk/src/five/pt/patches.py 2010-08-30 12:43:54 UTC (rev 116031)
@@ -19,6 +19,7 @@
from five.pt.pagetemplate import BaseTemplateFile
from Acquisition import aq_base
+from Acquisition import aq_parent
from Acquisition.interfaces import IAcquirer
from Acquisition import ImplicitAcquisitionWrapper
@@ -69,7 +70,7 @@
if IAcquirer.providedBy(template):
template = template.__of__(self)
else:
- template = ImplicitAcquisitionWrapper(template, self)
+ template = ImplicitAcquisitionWrapper(template, aq_parent(self))
return template(self, *args, **kw)
More information about the checkins
mailing list