[Erp5-report] r26292 - /erp5/trunk/products/ERP5/Tool/ContributionTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Apr 6 14:35:22 CEST 2009


Author: romain
Date: Mon Apr  6 14:35:21 2009
New Revision: 26292

URL: http://svn.erp5.org?rev=26292&view=rev
Log:
As the filename is not used as document ID, there is no reason to call checkId.
It prevents losing filename information (in case of non ASCII character) and
allow extracting metadata from it.

Modified:
    erp5/trunk/products/ERP5/Tool/ContributionTool.py

Modified: erp5/trunk/products/ERP5/Tool/ContributionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/ContributionTool.py?rev=26292&r1=26291&r2=26292&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/ContributionTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/ContributionTool.py [utf8] Mon Apr  6 14:35:21 2009
@@ -224,17 +224,6 @@
           document.edit(file=kw['file'])
           return document
 
-    #
-    # Strong possibility of a new file.
-    #
-    try:
-      self._checkId(file_name)
-    except BadRequest:
-      extension = ''
-      if '.' in file_name:
-        extension = '.%s' % file_name.split('.')[-1]
-      file_name = '%s%s' % (self.generateNewId(), extension)
-
     # Then put the file inside ourselves for a short while
     if container_path is not None:
       container = self.getPortalObject().restrictedTraverse(container_path)




More information about the Erp5-report mailing list