[Erp5-report] r11570 - /erp5/trunk/products/CMFCategory/CategoryTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Dec 1 14:17:09 CET 2006


Author: aurel
Date: Fri Dec  1 14:17:08 2006
New Revision: 11570

URL: http://svn.erp5.org?rev=11570&view=rev
Log:
do not acquire 'categories'  property

Modified:
    erp5/trunk/products/CMFCategory/CategoryTool.py

Modified: erp5/trunk/products/CMFCategory/CategoryTool.py
URL: http://svn.erp5.org/erp5/trunk/products/CMFCategory/CategoryTool.py?rev=11570&r1=11569&r2=11570&view=diff
==============================================================================
--- erp5/trunk/products/CMFCategory/CategoryTool.py (original)
+++ erp5/trunk/products/CMFCategory/CategoryTool.py Fri Dec  1 14:17:08 2006
@@ -743,7 +743,7 @@
       if type(spec) is type('a'):
         spec = [spec]
       # Filter categories
-      if hasattr(context, 'categories'):
+      if hasattr(aq_base(context), 'categories'):
         for category_url in self._getCategoryList(context):
           try:
             index = category_url.index('/')
@@ -869,7 +869,7 @@
       result = self.getSingleCategoryMembershipList( context, base_category, base=base,
                             spec=spec, filter=filter, **kw ) # Not acquired because this is the first try
                                                              # to get a local defined category
-                            
+      
       base_category_value = self.getCategoryValue(base_category)
       #LOG("base_category_value",0,str(base_category_value))
       #LOG("result",0,str(result))
@@ -1139,7 +1139,7 @@
 
     security.declareProtected( Permissions.AccessContentsInformation, '_getCategoryList' )
     def _getCategoryList(self, context):
-      if hasattr(context, 'categories'):
+      if hasattr(aq_base(context), 'categories'):
         if type(context.categories) == type((1,)):
           result = list(context.categories)
         elif type(context.categories) == type([]):




More information about the Erp5-report mailing list