From 99ca37fd8d3ce95458da422d8adcd6e00332f518 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Mon, 6 Apr 2009 12:35:21 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26292 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Tool/ContributionTool.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/product/ERP5/Tool/ContributionTool.py b/product/ERP5/Tool/ContributionTool.py index 68be025d6b..a67b74abaf 100644 --- a/product/ERP5/Tool/ContributionTool.py +++ b/product/ERP5/Tool/ContributionTool.py @@ -224,17 +224,6 @@ class ContributionTool(BaseTool): 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) -- 2.30.9