[Erp5-report] r18295 - /erp5/trunk/products/ERP5/Tool/ContributionTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Dec 13 11:34:10 CET 2007
Author: yusei
Date: Thu Dec 13 11:34:09 2007
New Revision: 18295
URL: http://svn.erp5.org?rev=18295&view=rev
Log:
Prevent exception if it cannot find default module for a specific portal type.
Modified:
erp5/trunk/products/ERP5/Tool/ContributionTool.py
Modified: erp5/trunk/products/ERP5/Tool/ContributionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/ContributionTool.py?rev=18295&r1=18294&r2=18295&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/ContributionTool.py (original)
+++ erp5/trunk/products/ERP5/Tool/ContributionTool.py Thu Dec 13 11:34:09 2007
@@ -277,7 +277,10 @@
if portal_type and container is None:
# We know the portal_type, let us find the default module
# 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:
# We could simplify things here and return a document immediately
More information about the Erp5-report
mailing list