Commit e20b8968 authored by Yusei Tahara's avatar Yusei Tahara

Prevent exception if it cannot find default module for a specific portal type.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18295 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d2dfd817
...@@ -277,7 +277,10 @@ class ContributionTool(BaseTool): ...@@ -277,7 +277,10 @@ class ContributionTool(BaseTool):
if portal_type and container is None: if portal_type and container is None:
# We know the portal_type, let us find the default module # We know the portal_type, let us find the default module
# and use it as container # and use it as container
container = self.getDefaultModule(portal_type) try:
container = self.getDefaultModule(portal_type)
except ValueError:
container = None
if portal_type and container is not None: if portal_type and container is not None:
# We could simplify things here and return a document immediately # We could simplify things here and return a document immediately
......
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