From 03b829664ae3c6dff9a669ad540cc75eb64f5cdb Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Tue, 22 Mar 2011 16:48:02 +0000
Subject: [PATCH] get rid of getToolByName

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44514 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/mixin/discoverable.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/product/ERP5/mixin/discoverable.py b/product/ERP5/mixin/discoverable.py
index 89597d1872..edc945feeb 100644
--- a/product/ERP5/mixin/discoverable.py
+++ b/product/ERP5/mixin/discoverable.py
@@ -31,7 +31,6 @@ from AccessControl import ClassSecurityInfo, getSecurityManager
 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(CachedConvertableMixin):
       # 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)
-- 
2.30.9