Commit e97ac155 authored by Ayush Tiwari's avatar Ayush Tiwari

BusinessSnapshot: Add item which belongs to installable Business Template

parent 472afddf
...@@ -206,14 +206,16 @@ class BusinessSnapshot(Folder): ...@@ -206,14 +206,16 @@ class BusinessSnapshot(Folder):
for commit in successor_commit_list: for commit in successor_commit_list:
for item in commit.objectValues(): for item in commit.objectValues():
item_path = item.getProperty('item_path') # Check if the item has a follow_up only with installable Business Template
if item_path in new_item_path_list: if item.getFollowUpValue().getAvailabilityState() == 'installable':
# Replace the old item with same path with new item item_path = item.getProperty('item_path')
new_item_list = [l if l.getProperty('item_path') != item_path else item for l in new_item_list] if item_path in new_item_path_list:
else: # Replace the old item with same path with new item
# Add the item to list if there is no existing item at that path new_item_list = [l if l.getProperty('item_path') != item_path else item for l in new_item_list]
new_item_list.append(item) else:
new_item_path_list.append(item_path) # Add the item to list if there is no existing item at that path
new_item_list.append(item)
new_item_path_list.append(item_path)
# Create hardlinks for the objects # Create hardlinks for the objects
for item in new_item_list: for item in new_item_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