Commit 0cd284ed authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Always set the object after removing te acquisition

parent 1701dcef
...@@ -278,7 +278,7 @@ class BusinessManager(Folder): ...@@ -278,7 +278,7 @@ class BusinessManager(Folder):
imported_manager = connection.importFile(file) imported_manager = connection.importFile(file)
self.title = imported_manager.title self.title = imported_manager.title
for obj in imported_manager.objectValues(): 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')) self.setProperty('template_path_list', imported_manager.getProperty('template_path_list'))
def __add__(self, other): def __add__(self, other):
......
...@@ -1700,7 +1700,7 @@ class TemplateTool (BaseTool): ...@@ -1700,7 +1700,7 @@ class TemplateTool (BaseTool):
title='Old Installation State', title='Old Installation State',
) )
for item in combined_installed_path_item: 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',] forbidden_bm_title_list = ['Old Installation State',]
for bm in bm_list: for bm in bm_list:
...@@ -1720,8 +1720,9 @@ class TemplateTool (BaseTool): ...@@ -1720,8 +1720,9 @@ class TemplateTool (BaseTool):
portal_type='Business Manager', portal_type='Business Manager',
title='New Installation State', title='New Installation State',
) )
for item in combined_new_path_item: 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 # Create installation process, which have the changes to be made in the
# OFS during installation. Importantly, it should also be a Business Manager # OFS during installation. Importantly, it should also be a Business Manager
...@@ -1771,7 +1772,7 @@ class TemplateTool (BaseTool): ...@@ -1771,7 +1772,7 @@ class TemplateTool (BaseTool):
to_install_path_item_list.append(item) to_install_path_item_list.append(item)
for item in to_install_path_item_list: 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) error_list = self.compareOldStateToOFS(installation_process, old_installation_state)
...@@ -1922,10 +1923,6 @@ class TemplateTool (BaseTool): ...@@ -1922,10 +1923,6 @@ class TemplateTool (BaseTool):
value = new_item.objectValues()[0] value = new_item.objectValues()[0]
except IndexError: except IndexError:
continue 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) new_item.install(installation_process)
return error_list 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