From 04f1782211641fbab55b20ce07970283a0870551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Tue, 4 Dec 2007 14:20:56 +0000 Subject: [PATCH] replace None per "" on all keys git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18002 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/Inventory.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/product/ERP5/Document/Inventory.py b/product/ERP5/Document/Inventory.py index 2425c59473..4da2008ff1 100644 --- a/product/ERP5/Document/Inventory.py +++ b/product/ERP5/Document/Inventory.py @@ -170,11 +170,13 @@ class Inventory(Delivery): current_inventory_dict = {} current_inventory_key_id_list = [x["key"] for x in inventory_calculation_dict['first_level']] 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) if inventory_calculation_dict.has_key("second_level"): # two level of variation -- 2.30.9