[Erp5-report] r44514 nicolas - /erp5/trunk/products/ERP5/mixin/discoverable.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Mar 22 17:48:02 CET 2011


Author: nicolas
Date: Tue Mar 22 17:48:02 2011
New Revision: 44514

URL: http://svn.erp5.org?rev=44514&view=rev
Log:
get rid of getToolByName

Modified:
    erp5/trunk/products/ERP5/mixin/discoverable.py

Modified: erp5/trunk/products/ERP5/mixin/discoverable.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/mixin/discoverable.py?rev=44514&r1=44513&r2=44514&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/mixin/discoverable.py [utf8] (original)
+++ erp5/trunk/products/ERP5/mixin/discoverable.py [utf8] Tue Mar 22 17:48:02 2011
@@ -31,7 +31,6 @@ from AccessControl import ClassSecurityI
 from ZODB.POSException import ConflictError
 from Products.ERP5Type import Permissions
 from Products.ERP5Type.Utils import convertToUpperCase
-from Products.CMFCore.utils import getToolByName
 from Products.ERP5.mixin.cached_convertable import CachedConvertableMixin
 import os
 import re
@@ -181,8 +180,7 @@ class DiscoverableMixin(CachedConvertabl
       # through to portal_contribution_registry
       # to guess destination portal_type against all properties.
       # If returned portal_type is different, then reingest.
-      registry = getToolByName(self.getPortalObject(),
-                              'portal_contribution_registry')
+      registry = self.getPortalObject().portal_contribution_registry
       portal_type = registry.findPortalTypeName(context=self)
       if portal_type != self.getPortalType():
         return self.migratePortalType(portal_type)



More information about the Erp5-report mailing list