Commit 03b82966 authored by Nicolas Delaby's avatar Nicolas Delaby

get rid of getToolByName


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44514 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4b0b0ed5
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment