diff --git a/product/ERP5/mixin/discoverable.py b/product/ERP5/mixin/discoverable.py index 89597d18722e27a16ec183e5963f1dbcd81d9fa2..edc945feeb48dfefc8e119511b3e9385b5539fe8 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)