Commit 4e17e114 authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Keep workflow_history for portal_components subobjects

parent 55d3dfc7
......@@ -637,7 +637,15 @@ class BusinessItem(XMLObject):
remove_sub_objects = kw.get('remove_sub_objects')
if remove_sub_objects:
removable_property_list.append('_tree')
obj = self.removeProperties(obj, 1, properties=removable_property_list)
keep_workflow_history = False
# For portal_components object, we need validation_history
if self.getProperty('item_path').startswith('portal_components'):
keep_workflow_history = True
obj = self.removeProperties(obj,
1,
properties=removable_property_list,
keep_workflow_history=keep_workflow_history,
)
obj = obj.__of__(context)
# XXX: '_recursiveRemoveUid' is not working as expected
_recursiveRemoveUid(obj)
......
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