From 65f579d49f3c274d1a532239bc502e1e33004352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Fri, 25 Jul 2008 16:34:52 +0000 Subject: [PATCH] keys from dictionnaries in the list of category info returned by Base_getCategoriesSpreadSheetMapping must be strings, not unicode git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22668 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_core/Base_getCategoriesSpreadSheetMapping.xml | 2 +- product/ERP5/bootstrap/erp5_core/bt/revision | 2 +- product/ERP5OOo/tests/testOOoImport.py | 2 ++ 3 files changed, 4 insertions(+), 2 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 cd4cf16855..dd5d2c32f1 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 @@ -174,7 +174,7 @@ for table_name in spreadsheets.keys():\n # started, that seems the path definition has ended\n if \'path_0\' in property_map.values():\n path_index == None\n - property_map[column_index] = column_id\n + property_map[column_index] = column_id.encode(\'utf8\')\n column_index += 1\n \n # Construct categories data (with absolute path) from table lines\n diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index e517ae7abf..7e752471bf 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -917 \ No newline at end of file +918 \ No newline at end of file diff --git a/product/ERP5OOo/tests/testOOoImport.py b/product/ERP5OOo/tests/testOOoImport.py index 0f29508427..10ade50baf 100644 --- a/product/ERP5OOo/tests/testOOoImport.py +++ b/product/ERP5OOo/tests/testOOoImport.py @@ -220,6 +220,8 @@ class TestOOoImport(ERP5TypeTestCase): # strings are encoded in UTF8 self.assertTrue(isinstance(region[1]['title'], str)) self.assertTrue(isinstance(region[1]['path'], str)) + for k in region[1].keys(): + self.assertTrue(isinstance(k, str), (k, type(k))) def test_CategoryTool_importCategoryFile(self): # tests simple use of CategoryTool_importCategoryFile script -- 2.30.9