Commit b15160aa authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Delete _tree attribute before installing new Business Item

parent d080ad28
...@@ -1747,8 +1747,9 @@ class TemplateTool (BaseTool): ...@@ -1747,8 +1747,9 @@ class TemplateTool (BaseTool):
# Update hashes of item in old state before installation # Update hashes of item in old state before installation
for item in old_installation_state._path_item_list: for item in old_installation_state._path_item_list:
value = item.value print item.value
item._sha = self.calculateComparableHash(value) if item.value:
item._sha = self.calculateComparableHash(item.value)
# Path Item List for installation_process should be the difference between # Path Item List for installation_process should be the difference between
# old and new installation state # old and new installation state
...@@ -1909,10 +1910,10 @@ class TemplateTool (BaseTool): ...@@ -1909,10 +1910,10 @@ class TemplateTool (BaseTool):
value = new_item.value value = new_item.value
if value is None: if value is None:
continue continue
if value._tree: if getattr(value, '_tree', None):
# This check is required cause only after first access we get the # This check is required cause only after first access we get the
# values from the dict # values from the dict
del value._tree 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