[Checkins] SVN: Products.ZCatalog/trunk/src/Products/ZCatalog/CatalogBrains.py - tweaking

Yvo Schubbe y.2011 at wcm-solutions.de
Thu Sep 22 09:42:56 EST 2011


Log message for revision 122894:
  - tweaking

Changed:
  U   Products.ZCatalog/trunk/src/Products/ZCatalog/CatalogBrains.py

-=-
Modified: Products.ZCatalog/trunk/src/Products/ZCatalog/CatalogBrains.py
===================================================================
--- Products.ZCatalog/trunk/src/Products/ZCatalog/CatalogBrains.py	2011-09-22 13:45:34 UTC (rev 122893)
+++ Products.ZCatalog/trunk/src/Products/ZCatalog/CatalogBrains.py	2011-09-22 14:42:55 UTC (rev 122894)
@@ -25,6 +25,7 @@
 
 from .interfaces import ICatalogBrain
 from Acquisition import aq_base
+from Acquisition import aq_get
 from Acquisition import aq_parent
 from Acquisition import Implicit
 from Record import Record
@@ -53,7 +54,7 @@
 
     def getURL(self, relative=0):
         """Generate a URL for this record"""
-        request = getattr(self, 'REQUEST', None)
+        request = aq_get(self, 'REQUEST', None)
         if request is None:
             if _GLOBALREQUEST_INSTALLED:
                 request = getRequest()
@@ -65,7 +66,7 @@
         Same as getObject, but does not do security checks.
         """
         parent = aq_parent(self)
-        if getattr(parent, 'REQUEST', None) is None:
+        if aq_get(parent, 'REQUEST', None) is None:
             if _GLOBALREQUEST_INSTALLED:
                 request = getRequest()
                 if request is not None:
@@ -90,7 +91,7 @@
         if not path:
             return None
         parent = aq_parent(self)
-        if getattr(parent, 'REQUEST', None) is None:
+        if aq_get(parent, 'REQUEST', None) is None:
             if _GLOBALREQUEST_INSTALLED:
                 request = getRequest()
                 if request is not None:



More information about the checkins mailing list