From e36e182e52782bb78b816a4bd86a773338e36463 Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Wed, 17 Dec 2008 09:21:48 +0000 Subject: [PATCH] Avoid checking ids for header row git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24913 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_core/Base_getCategoriesSpreadSheetMapping.xml | 6 +++--- product/ERP5/bootstrap/erp5_core/bt/revision | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCategoriesSpreadSheetMapping.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCategoriesSpreadSheetMapping.xml index 40f009ee06..73524f016d 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCategoriesSpreadSheetMapping.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCategoriesSpreadSheetMapping.xml @@ -97,7 +97,7 @@ except AttributeError:\n property_id_list = []\n \n \n -def getIDFromString(string=None):\n +def getIDFromString(string=None, force=0):\n """\n This function transform a string to a safe and beautiful ID.\n It is used here to create a safe category ID from a string.\n @@ -130,7 +130,7 @@ def getIDFromString(string=None):\n while len(clean_id) > 0 and not clean_id[-1].isalnum():\n clean_id = clean_id[:-1]\n \n - if clean_id in property_id_list:\n + if clean_id in property_id_list and not force:\n invalid_spreadsheet_error_handler(translateString(\n "The ID ${id} is invalid, it\'s a reserved property name",\n mapping=dict(id=clean_id)))\n @@ -167,7 +167,7 @@ for table_name in spreadsheets.keys():\n column_index = 0\n path_index = 0\n for column in columns_header:\n - column_id = getIDFromString(column)\n + column_id = getIDFromString(column, force=1)\n # This give us the information that the path definition has started\n path_def_started = \'path_0\' in property_map.values()\n # The path of the category has started to be expressed\n diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 03c4ecbc93..c16c9d01f8 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -1044 \ No newline at end of file +1046 \ No newline at end of file -- 2.30.9