[Erp5-report] r41630 kazuhiko - /erp5/trunk/products/ERP5/mixin/discoverable.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Dec 21 21:49:13 CET 2010


Author: kazuhiko
Date: Tue Dec 21 21:49:13 2010
New Revision: 41630

URL: http://svn.erp5.org?rev=41630&view=rev
Log:
fix r41623 that may cause KeyError if kw has not 'portal_type'.

Modified:
    erp5/trunk/products/ERP5/mixin/discoverable.py

Modified: erp5/trunk/products/ERP5/mixin/discoverable.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/mixin/discoverable.py?rev=41630&r1=41629&r2=41630&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/mixin/discoverable.py [utf8] (original)
+++ erp5/trunk/products/ERP5/mixin/discoverable.py [utf8] Tue Dec 21 21:49:13 2010
@@ -160,7 +160,7 @@ class DiscoverableMixin(CachedConvertabl
       portal_type = input_parameter_dict.get('portal_type')
     if not portal_type:
       # Read discovered portal_type
-      portal_type = kw.pop('portal_type')
+      portal_type = kw.pop('portal_type', None)
     if portal_type and portal_type != self.getPortalType():
       # Reingestion is required to update portal_type
       return self.migratePortalType(portal_type)



More information about the Erp5-report mailing list