Commit 0605ce17 authored by Romain Courteaud's avatar Romain Courteaud

Keep compatibility with previous export format of...

Keep compatibility with previous export format of business_template_registered_skin_selections and do not modify exported value


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29359 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 40032b73
...@@ -967,13 +967,20 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -967,13 +967,20 @@ class ObjectTemplateItem(BaseTemplateItem):
container.getParentValue().updateCache() container.getParentValue().updateCache()
elif (container.meta_type == 'CMF Skins Tool') and \ elif (container.meta_type == 'CMF Skins Tool') and \
(old_obj is not None): (old_obj is not None):
# Keep previous value of register skin selection for skin folder # Keep compatibility with previous export format of
skin_selection_list = old_obj.getProperty( # business_template_registered_skin_selections
'business_template_registered_skin_selections', None) # and do not modify exported value
if skin_selection_list is not None: if obj.getProperty('business_template_registered_skin_selections',
obj._setProperty( None) is None:
'business_template_registered_skin_selections', # Keep previous value of register skin selection for skin folder
skin_selection_list, type='tokens') skin_selection_list = old_obj.getProperty(
'business_template_registered_skin_selections', None)
if skin_selection_list is not None:
if isinstance(skin_selection_list, basestring):
skin_selection_list = skin_selection_list.split(' ')
obj._setProperty(
'business_template_registered_skin_selections',
skin_selection_list, type='tokens')
recurse(restoreHook, obj) recurse(restoreHook, obj)
# now put original order group # now put original order group
......
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