Commit ff434999 authored by Rafael Monnerat's avatar Rafael Monnerat

Define in upgrader signature if site will be recatalogued or NOT. By default it will be.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39075 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1e6366ba
......@@ -539,6 +539,8 @@ UPGRADE_OBJECT_CLASS_LIST = ( (\'portal_gadgets\', \n
\'Products.ERP5Type.Document.Gadget.Gadget\', \n
\'ERP5Site_testUpgradeObjectClass\' ), )\n
\n
RECATALOG = True\n
\n
# Wrap everything into a dict\n
signature_dict = {\n
# Defines the alarms enabled for the upgrade\n
......@@ -580,6 +582,8 @@ signature_dict = {\n
, \'erp5_site_property_dict\' : ERP5_SITE_PROPERTY_DICT\n
# Provide a list of tuples with informations to upgrade object class\n
, \'upgrade_object_class_list\' : UPGRADE_OBJECT_CLASS_LIST\n
# Define if the site will be recatalogued or not after finish upgrade.\n
, \'recatalog\' : RECATALOG\n
}\n
\n
if item is not None:\n
......@@ -650,6 +654,7 @@ else:\n
<string>INTEGRITY_VERIFICATION_SCRIPT_ID_LIST</string>
<string>ERP5_SITE_PROPERTY_DICT</string>
<string>UPGRADE_OBJECT_CLASS_LIST</string>
<string>RECATALOG</string>
<string>signature_dict</string>
</tuple>
</value>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
......@@ -59,6 +56,9 @@
standard way to detect if the SQLUpgrade is needed. Reindexation should \n
be only a consequence of other script only.\n
"""\n
signature = context.ERP5Site_getUpgraderSignature()\n
if not signature.get("recatalog", True):\n
return []\n
\n
if not upgrade:\n
# Never consider outdated.\n
......@@ -123,9 +123,11 @@ return message_list\n
<value>
<tuple>
<string>upgrade</string>
<string>message_list</string>
<string>_getattr_</string>
<string>context</string>
<string>signature</string>
<string>True</string>
<string>message_list</string>
<string>catalog</string>
<string>tag</string>
</tuple>
......
535
\ No newline at end of file
536
\ No newline at end of file
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