From 24e6f5947932bb3d7cc26df5547bda1bbe4502e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Wed, 24 Oct 2007 14:34:25 +0000 Subject: [PATCH] replace None per "" on all keys git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17170 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/Inventory.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/product/ERP5/Document/Inventory.py b/product/ERP5/Document/Inventory.py index e3d8282354..85d2e4417a 100644 --- a/product/ERP5/Document/Inventory.py +++ b/product/ERP5/Document/Inventory.py @@ -116,11 +116,11 @@ class Inventory(Delivery): current_inventory_dict = {} current_inventory_key_id_list = ('resource_relative_url', 'variation_text') for line in current_inventory_list: - current_inventory_key = tuple( - [line[x] for x in current_inventory_key_id_list]) - if current_inventory_key[1] is None: - # To be consistent - current_inventory_key = (current_inventory_key[0], "") + current_inventory_key = [line[x] for x in current_inventory_key_id_list] + for x in xrange(len(current_inventory_key)): + if current_inventory_key[x] is None: + current_inventory_key[x] = "" + current_inventory_key = tuple(current_inventory_key) try: current_inventory_by_sub_variation = \ current_inventory_dict[current_inventory_key] -- 2.30.9