Commit 64f77c5a authored by Nicolas Dumazet's avatar Nicolas Dumazet

portal_contribution_registry seems to need the data to determine the portal type

(for instance for email ingestion).

This fixes TestCRM.test_portal_type_ingestion


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41477 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9cd1a411
......@@ -203,8 +203,14 @@ class ContributionTool(BaseTool):
if portal_type is None:
# Guess it with help of portal_contribution_registry
# XXX may be broken for non-cStringIO files / IO that cant be replayed?
data = file_object.read()
file_object.seek(0)
registry = portal.portal_contribution_registry
portal_type = registry.findPortalTypeName(filename=filename,
data=data,
content_type=content_type)
#
# Check if same file is already exists. if it exists, then update it.
......
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