Commit 24e6f594 authored by Aurel's avatar Aurel

replace None per "" on all keys


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17170 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c06dfe5
...@@ -116,11 +116,11 @@ class Inventory(Delivery): ...@@ -116,11 +116,11 @@ class Inventory(Delivery):
current_inventory_dict = {} current_inventory_dict = {}
current_inventory_key_id_list = ('resource_relative_url', 'variation_text') current_inventory_key_id_list = ('resource_relative_url', 'variation_text')
for line in current_inventory_list: for line in current_inventory_list:
current_inventory_key = tuple( current_inventory_key = [line[x] for x in current_inventory_key_id_list]
[line[x] for x in current_inventory_key_id_list]) for x in xrange(len(current_inventory_key)):
if current_inventory_key[1] is None: if current_inventory_key[x] is None:
# To be consistent current_inventory_key[x] = ""
current_inventory_key = (current_inventory_key[0], "") current_inventory_key = tuple(current_inventory_key)
try: try:
current_inventory_by_sub_variation = \ current_inventory_by_sub_variation = \
current_inventory_dict[current_inventory_key] current_inventory_dict[current_inventory_key]
......
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