Commit 2f5eb725 authored by Romain Courteaud's avatar Romain Courteaud

Try to guess the portal if it is not passed as parameter


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24351 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9eb6ed53
......@@ -243,7 +243,9 @@ class ContributionTool(BaseTool):
extension = '.%s' % file_name.split('.')[-1]
file_name = '%s%s' % (self.generateNewId(), extension)
portal_type = self._guessPortalType(file_name, mime_type, data)
# Try to guess the portal if it is not passed as parameter
if portal_type is None:
portal_type = self._guessPortalType(file_name, mime_type, data)
# Then put the file inside ourselves for a short while
if container_path is not 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