Commit 2c7691bd authored by Nicolas Dumazet's avatar Nicolas Dumazet

raising an error on migration of Tools is not wise at all:

if some BTs are too old, the portal type will be missing,
and the portal type wont be found, and the instance wont
be upgraded.

This issue needs to be tested more nicely, but for now,
remove the raise


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42970 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e31b5da9
......@@ -85,11 +85,11 @@ class BaseTool (UniqueObject, Folder):
types_tool = self.getPortalObject().portal_types
type_definition = getattr(types_tool, portal_type, None)
if type_definition is None:
from Products.ERP5.Document.Document import NotConvertedError
raise NotConvertedError(
LOG('BaseTool._migrateToPortalTypeClass', WARNING,
"No portal type definition was found for Tool '%s'"
" (class %s, portal_type '%s')"
% (self.getRelativeUrl(), self.__class__.__name__, portal_type))
return
type_class = type_definition.getTypeClass()
if type_class in ('Folder', None):
......@@ -99,10 +99,10 @@ class BaseTool (UniqueObject, Folder):
if document_class_name in document_class_registry:
type_definition.type_class = document_class_name
else:
from Products.ERP5.Document.Document import NotConvertedError
raise NotConvertedError(
LOG('BaseTool._migrateToPortalTypeClass', WARNING,
'No document class could be found for portal type %s'
% portal_type)
return
return super(BaseTool, self)._migrateToPortalTypeClass()
......
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