From d5090e0bf5bad4400b4347ee505a4059ba95e2c0 Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Mon, 20 Sep 2010 09:02:01 +0000 Subject: [PATCH] Two different variables were used to store the content_type of files, mime_type and content_type. Choose only one variable for consistency. This patch avoid loosing useful informations. content_type name is preferred because it is the id of property on ERP5 Documents. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38474 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Tool/ContributionTool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product/ERP5/Tool/ContributionTool.py b/product/ERP5/Tool/ContributionTool.py index 037942961d..476a54ef87 100644 --- a/product/ERP5/Tool/ContributionTool.py +++ b/product/ERP5/Tool/ContributionTool.py @@ -142,7 +142,7 @@ class ContributionTool(BaseTool): document = None # Try to find the file_name - mime_type = None + content_type = None if not url: # check if file was provided file = kw.get('file', None) @@ -220,7 +220,7 @@ class ContributionTool(BaseTool): # Check if same file is already exists. if it exists, then update it. # if portal_type is None: - portal_type = self._guessPortalType(file_name, mime_type, data) + portal_type = self._guessPortalType(file_name, content_type, data) property_dict = self.getMatchedFileNamePatternDict(file_name) reference = property_dict.get('reference', None) version = property_dict.get('version', None) -- 2.30.9