[Erp5-report] r24906 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Dec 16 15:32:56 CET 2008


Author: jerome
Date: Tue Dec 16 15:32:55 2008
New Revision: 24906

URL: http://svn.erp5.org?rev=24906&view=rev
Log:
detect duplicates IDs when importing categories

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCategoriesSpreadSheetMapping.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCategoriesSpreadSheetMapping.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCategoriesSpreadSheetMapping.xml?rev=24906&r1=24905&r2=24906&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCategoriesSpreadSheetMapping.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getCategoriesSpreadSheetMapping.xml [utf8] Tue Dec 16 15:32:55 2008
@@ -247,6 +247,14 @@
             # (i.e. its tranformation to ID is not the same as the original value)\n
             if clean_title != cell_id:\n
               category_properties[\'title\'] = clean_title\n
+\n
+          # Detect duplicate IDs\n
+          #if path_elements and path_elements[-1][\'depth\'] == element_depth:\n
+          for element in path_elements[::-1]:\n
+            if element[\'depth\'] != element_depth:\n
+              break\n
+            if element[\'value\'] == path_element_id:\n
+              raise ValueError("Duplicate id %s" % element[\'value\'])\n
 \n
           # Save the path element\n
           path_elements.append({ \'depth\': element_depth\n
@@ -355,6 +363,7 @@
                             <string>element</string>
                             <string>path</string>
                             <string>clean_title</string>
+                            <string>ValueError</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=24906&r1=24905&r2=24906&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Tue Dec 16 15:32:55 2008
@@ -1,1 +1,1 @@
-1040
+1042




More information about the Erp5-report mailing list