Commit 75a6f551 authored by Rafael Monnerat's avatar Rafael Monnerat

Ignore this upgrade if Key is None.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42355 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1917cd34
...@@ -51,6 +51,11 @@ ...@@ -51,6 +51,11 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>message_list = []\n <value> <string>message_list = []\n
expect_expression_dict = context.ERP5Site_getUpgraderSignature(\'catalog_filter_dict\')\n
if expect_expression_dict is None:\n
# If key is not provided, ignore.\n
return []\n
\n
catalog = context.portal_catalog.erp5_mysql_innodb\n catalog = context.portal_catalog.erp5_mysql_innodb\n
\n \n
filter_dict = catalog.getFilterDict()\n filter_dict = catalog.getFilterDict()\n
...@@ -58,8 +63,6 @@ catalog_filter_dict = {}\n ...@@ -58,8 +63,6 @@ catalog_filter_dict = {}\n
for key in filter_dict:\n for key in filter_dict:\n
catalog_filter_dict[key] = filter_dict[key][\'expression\']\n catalog_filter_dict[key] = filter_dict[key][\'expression\']\n
\n \n
expect_expression_dict = context.ERP5Site_getUpgraderSignature(\'catalog_filter_dict\')\n
\n
# test if keys are the same\n # test if keys are the same\n
for key in expect_expression_dict:\n for key in expect_expression_dict:\n
if expect_expression_dict[key] != catalog_filter_dict[key]:\n if expect_expression_dict[key] != catalog_filter_dict[key]:\n
...@@ -77,78 +80,14 @@ for key in expect_expression_dict:\n ...@@ -77,78 +80,14 @@ for key in expect_expression_dict:\n
return message_list\n return message_list\n
</string> </value> </string> </value>
</item> </item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>upgrade=0</string> </value> <value> <string>upgrade=0</string> </value>
</item> </item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>upgrade</string>
<string>message_list</string>
<string>_getattr_</string>
<string>context</string>
<string>catalog</string>
<string>filter_dict</string>
<string>catalog_filter_dict</string>
<string>_getiter_</string>
<string>key</string>
<string>_getitem_</string>
<string>_write_</string>
<string>expect_expression_dict</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<int>0</int>
</tuple>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>ERP5Site_upgradeSQLCatalogFilter</string> </value> <value> <string>ERP5Site_upgradeSQLCatalogFilter</string> </value>
</item> </item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
559 562
\ No newline at end of file \ 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