Commit c0ac0986 authored by Aurel's avatar Aurel

do not recreate catalog at update of tools


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4963 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b665a4d4
......@@ -709,8 +709,9 @@ class ERP5Generator(PortalGenerator):
# It is better to remove portal_catalog which is ZCatalog as soon as possible,
# because the API is not the completely same as ERP5Catalog, and ZCatalog is
# useless for ERP5 after all.
update = kw.get('update', 0)
portal_catalog = getToolByName(p, 'portal_catalog', None)
if portal_catalog is not None and portal_catalog.meta_type != 'ZSQLCatalog':
if portal_catalog is not None and portal_catalog.meta_type != 'ZSQLCatalog' and not update:
p._delObject('portal_catalog')
# Add CMF Report Tool
......@@ -768,7 +769,7 @@ class ERP5Generator(PortalGenerator):
pass
# Create default methods in Catalog XXX
portal_catalog = getToolByName(p, 'portal_catalog')
if not portal_catalog.getSQLCatalog('erp5_mysql'):
if not portal_catalog.getSQLCatalog('erp5_mysql') and not update:
# FIXME: addDefaultSQLMethods should be removed.
portal_catalog.addDefaultSQLMethods('erp5_mysql')
......
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