Commit c20b2d89 authored by Nicolas Dumazet's avatar Nicolas Dumazet

if this happens during BT installation, we have no guarantee that the object is

wrapped. Use the handy mighty getSite() instead.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42983 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eb27f6a6
......@@ -82,7 +82,8 @@ class BaseTool (UniqueObject, Folder):
# type_class, or sometimes have no type definitions at all.
# Check that everything is alright before trying
# to migrate the tool:
types_tool = self.getPortalObject().portal_types
from Products.ERP5.ERP5Site import getSite
types_tool = getSite().portal_types
type_definition = getattr(types_tool, portal_type, None)
if type_definition is None:
LOG('BaseTool._migrateToPortalTypeClass', WARNING,
......
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