Commit 587e532b authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fix r41623 that may cause KeyError if kw has not 'portal_type'.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41630 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bb9efdef
...@@ -160,7 +160,7 @@ class DiscoverableMixin(CachedConvertableMixin): ...@@ -160,7 +160,7 @@ class DiscoverableMixin(CachedConvertableMixin):
portal_type = input_parameter_dict.get('portal_type') portal_type = input_parameter_dict.get('portal_type')
if not portal_type: if not portal_type:
# Read discovered 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(): if portal_type and portal_type != self.getPortalType():
# Reingestion is required to update portal_type # Reingestion is required to update portal_type
return self.migratePortalType(portal_type) return self.migratePortalType(portal_type)
......
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