[Checkins] SVN: five.pt/trunk/src/five/pt/patches.py Only rewrap acquisition chain, if object is an acquirer.

Malthe Borch mborch at gmail.com
Fri Feb 13 11:53:34 EST 2009


Log message for revision 96495:
  Only rewrap acquisition chain, if object is an acquirer.

Changed:
  U   five.pt/trunk/src/five/pt/patches.py

-=-
Modified: five.pt/trunk/src/five/pt/patches.py
===================================================================
--- five.pt/trunk/src/five/pt/patches.py	2009-02-13 16:17:17 UTC (rev 96494)
+++ five.pt/trunk/src/five/pt/patches.py	2009-02-13 16:53:33 UTC (rev 96495)
@@ -12,6 +12,7 @@
      ZopeViewPageTemplateFile
 
 from Acquisition import aq_base
+from Acquisition.interfaces import IAcquirer
 
 try:
     from Products.Five.browser.pagetemplatefile import BoundPageTemplate
@@ -31,8 +32,8 @@
                 im_self, args = args[0], args[1:]
             else:
                 im_self = aq_base(self.im_self)
-                im_self = im_self.__of__(im_self.context)
-
+                if IAcquirer.providedBy(im_self):
+                    im_self = im_self.__of__(im_self.context)
             return self.im_func(im_self, *args, **kw)
 
 from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile as \



More information about the Checkins mailing list