Commit db810c0d authored by Nicolas Delaby's avatar Nicolas Delaby

Always keep portal_type choosed by user


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41623 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f44e6da5
......@@ -154,7 +154,13 @@ class DiscoverableMixin(CachedConvertableMixin):
if value not in (None, ''):
kw[key]=value
# Prepare the content edit parameters
portal_type = kw.pop('portal_type', None)
portal_type = None
if input_parameter_dict is not None:
# User decision take precedence, never try to change this value
portal_type = input_parameter_dict.get('portal_type')
if not portal_type:
# Read discovered portal_type
portal_type = kw.pop('portal_type')
if portal_type and portal_type != self.getPortalType():
# Reingestion is required to update 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