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

if called very early, the types tool might not be here


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42325 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 792ea553
...@@ -1403,11 +1403,12 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin): ...@@ -1403,11 +1403,12 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
We consider that a Site is migrated if its Types Tool is migrated We consider that a Site is migrated if its Types Tool is migrated
(it will always be migrated last)""" (it will always be migrated last)"""
# XXX do we want to call this automatically? Where? (note that it's likely types_tool = getattr(self, 'portal_types', None)
# to fail as portal types are usually not perfectly configured, and it if types_tool is None:
# requires user action to fix issues) # empty site
if self.portal_types.__class__.__module__ == 'erp5.portal_type': return
# nothing to do if types_tool.__class__.__module__ == 'erp5.portal_type':
# nothing to do, already migrated
return return
# note that the site itself is not migrated (ERP5Site is not a portal type) # note that the site itself is not migrated (ERP5Site is not a 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