Commit fc085f12 authored by Kevin Deldycke's avatar Kevin Deldycke

Better handling of empty list


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4560 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9c82531e
......@@ -80,10 +80,11 @@ code_list = []\n
# sort the category list lexicographically\n
# this prevents us to choose the exact order we want,\n
# but also prevents some human mistake to f*ck everything up by creating site_function instead of function_site\n
category_list = []\n
if category_order not in (None, \'\', (), []):\n
category_list = [ x for x in category_order]\n
category_order = category_list.sort()\n
if category_order not in (None, \'\'):\n
category_order = [ x for x in category_order]\n
category_order.sort()\n
else:\n
category_order = []\n
\n
for base_category in category_order:\n
category = kw[base_category]\n
......@@ -99,29 +100,28 @@ return \'_\'.join(code_list)\n
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAQAAABEAAAARAAAASwAA
AHMvAQAAZwAAfQIAZwAAfQMAfAAAdAMAZAEAZgAAZwAAZgQAagcAbzEAAWcAAARpBAB9BgB0BgB8
AACDAQBEXRAAfQgAfAYAfAgAgwEAAXE5AH4GAH0DAG4BAAF0CAB8AwBkAgCDAgCDAAB9AAB4rQB0
BgB8AACDAQBEXZ8AfQoAdAoAfAEAfAoAgwIAfQwAZAMAfAoAfAwAZgIAFn0NAHQIAHQIAHQOAGQE
AIMCAGQFAIMCAHwNAIMBAH0PAHwPAHQDAGQBAGYCAGoGAG8RAAFkBgBkBwB8DQAWggIAbgEAAXQI
AHwPAGQIAIMCAIMAAHAQAAF0CAB8DwBkCQCDAgCDAAB9EAB0CAB8AgBkCgCDAgB8EACDAQABcXUA
V3QIAGQLAGQMAIMCAHwCAIMBAFNkAABTKA0AAABOcwAAAABzBAAAAHNvcnRzBQAAACVzLyVzcxEA
AABwb3J0YWxfY2F0ZWdvcmllc3MQAAAAZ2V0Q2F0ZWdvcnlWYWx1ZXMbAAAAU2VjdXJpdHlSb2xl
RG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jb250ZXh0cw8A
AABjYXRlZ29yeV9vYmplY3RzDQAAAGNhdGVnb3J5X2NvZGUoEAAAAHMOAAAAY2F0ZWdvcnlfb3Jk
ZXJzAgAAAGt3cwkAAABjb2RlX2xpc3RzBAAAAE5vbmVzBgAAAGFwcGVuZHMIAAAAJGFwcGVuZDBz
CQAAAF9nZXRpdGVyX3MBAAAAeHMJAAAAX2dldGF0dHJfcw0AAABiYXNlX2NhdGVnb3J5cwkAAABf
Z2V0aXRlbV9zCAAAAGNhdGVnb3J5cw0AAABjYXRlZ29yeV9wYXRocwcAAABjb250ZXh0cw8AAABj
YXRlZ29yeV9vYmplY3RzDQAAAGNhdGVnb3J5X2NvZGUoAAAAACgAAAAAcw8AAABTY3JpcHQgKFB5
dGhvbilzGgAAAEVSUDVUeXBlX2FzU2VjdXJpdHlHcm91cElkAQAAAHMgAAAAAAkGBRMBFAAcAREC
BgINAAYBDwEQAR4BEwERASgBFAIoAQAAAHMaAAAARVJQNVR5cGVfYXNTZWN1cml0eUdyb3VwSWQo
AQAAAHMaAAAARVJQNVR5cGVfYXNTZWN1cml0eUdyb3VwSWQoAAAAACgAAAAAcw8AAABTY3JpcHQg
KFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
</item>
<item>
<key> <string>_filepath</string> </key>
......@@ -158,7 +158,6 @@ PG1vZHVsZT4BAAAAcwAAAAA=</string> </value>
<string>category_order</string>
<string>kw</string>
<string>code_list</string>
<string>category_list</string>
<string>None</string>
<string>append</string>
<string>$append0</string>
......
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