Commit dae20bb9 authored by Ayush Tiwari's avatar Ayush Tiwari

BusinessSnapshot: Add item which belongs to installable BT only while building snapshot

parent e97ac155
...@@ -171,9 +171,10 @@ class BusinessSnapshot(Folder): ...@@ -171,9 +171,10 @@ class BusinessSnapshot(Folder):
# new snapshot # new snapshot
if last_snapshot: if last_snapshot:
# [1]: Extend the item_list with list of items from last snapshot for item in last_snapshot.objectValues():
new_item_list.extend(last_snapshot.getItemList()) if item.getFollowUpValue().getAvailabilityState() == 'installable':
new_item_path_list.extend(last_snapshot.getItemPathList()) new_item_list.append(item)
new_item_path_list.extend(item.getProperty('item_path'))
# Get next predecessor commit for this snapshot using the equivalent commit # Get next predecessor commit for this snapshot using the equivalent commit
# Notice that we don't use the snapshot to get the next commit as the # Notice that we don't use the snapshot to get the next commit as the
...@@ -191,8 +192,10 @@ class BusinessSnapshot(Folder): ...@@ -191,8 +192,10 @@ class BusinessSnapshot(Folder):
self.aq_parent.objectValues(portal_type='Business Commit'), self.aq_parent.objectValues(portal_type='Business Commit'),
key=(lambda x: x.getCreationDate())) key=(lambda x: x.getCreationDate()))
new_item_list.extend(oldest_commit.objectValues()) for item in oldest_commit.objectValues():
new_item_path_list.extend(oldest_commit.getItemPathList()) if item.getFollowUpValue().getAvailabilityState() == 'installable':
new_item_list.append(item)
new_item_path_list.extend(item.getProperty('item_path'))
next_commit = oldest_commit.getPredecessorRelatedValue() next_commit = oldest_commit.getPredecessorRelatedValue()
......
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