Commit ed36c35a authored by Jean-Paul Smets's avatar Jean-Paul Smets

I do not like so much equality to a list because it may return the wrong...

I do not like so much equality to a list because it may return the wrong result if one of the types is a tuple.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16879 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b230d3f9
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <tuple>
<tuple/> <string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -83,7 +86,7 @@ if option_variation==1:\n ...@@ -83,7 +86,7 @@ if option_variation==1:\n
base_category_list = context.getVariationRangeBaseCategoryList()\n base_category_list = context.getVariationRangeBaseCategoryList()\n
option_base_category_list = [x for x in base_category_list \\\n option_base_category_list = [x for x in base_category_list \\\n
if x not in no_option_base_category_list]\n if x not in no_option_base_category_list]\n
if option_base_category_list == []:\n if not option_base_category_list:\n
base_category_list_list = []\n base_category_list_list = []\n
else:\n else:\n
base_category_list_list = [option_base_category_list]\n base_category_list_list = [option_base_category_list]\n
...@@ -95,7 +98,7 @@ else:\n ...@@ -95,7 +98,7 @@ else:\n
if base_id in (\'path\', \'reference\'):\n if base_id in (\'path\', \'reference\'):\n
# XXX Compatibility\n # XXX Compatibility\n
selected_base_category_list = context.getPVariationBaseCategoryList()\n selected_base_category_list = context.getPVariationBaseCategoryList()\n
if selected_base_category_list == []:\n if not selected_base_category_list:\n
# XXX Compatibility...\n # XXX Compatibility...\n
if context.getParentValue().getPortalType() in \\\n if context.getParentValue().getPortalType() in \\\n
context.getPortalResourceTypeList():\n context.getPortalResourceTypeList():\n
......
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