Commit d5090e0b authored by Nicolas Delaby's avatar Nicolas Delaby

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
parent 4f2a120e
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment