Commit 407122cf authored by Ayush Tiwari's avatar Ayush Tiwari Committed by Ayush Tiwari

bt5_config: Always set the object after removing te acquisition

parent 3f2b33b9
......@@ -278,7 +278,7 @@ class BusinessManager(Folder):
imported_manager = connection.importFile(file)
self.title = imported_manager.title
for obj in imported_manager.objectValues():
self._setObject(obj.getId(), obj)
self._setObject(obj.getId(), aq_base(obj))
self.setProperty('template_path_list', imported_manager.getProperty('template_path_list'))
def __add__(self, other):
......
......@@ -1703,7 +1703,7 @@ class TemplateTool (BaseTool):
title='Old Installation State',
)
for item in combined_installed_path_item:
old_installation_state._setObject(item.getId(), item)
old_installation_state._setObject(item.getId(), aq_base(item))
forbidden_bm_title_list = ['Old Installation State',]
for bm in bm_list:
......@@ -1723,8 +1723,9 @@ class TemplateTool (BaseTool):
portal_type='Business Manager',
title='New Installation State',
)
for item in combined_new_path_item:
new_installation_state._setObject(item.getId(), item)
new_installation_state._setObject(item.getId(), aq_base(item))
# Create installation process, which have the changes to be made in the
# OFS during installation. Importantly, it should also be a Business Manager
......@@ -1774,7 +1775,7 @@ class TemplateTool (BaseTool):
to_install_path_item_list.append(item)
for item in to_install_path_item_list:
installation_process._setObject(item.getId(), item)
installation_process._setObject(item.getId(), aq_base(item))
error_list = self.compareOldStateToOFS(installation_process, old_installation_state)
......@@ -1925,10 +1926,6 @@ class TemplateTool (BaseTool):
value = new_item.objectValues()[0]
except IndexError:
continue
if getattr(value, '_tree', None):
# This check is required cause only after first access we get the
# values from the dict
delattr(value, '_tree')
new_item.install(installation_process)
return error_list
......
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