Browse Source

Fix items_behind error when moving a change

When moving an item, we correctly reparented the items behind
the item to the item that was previously ahead.  But we did
not remove the references to the items behind from the item
that was being moved.  This could result in that item
maintaining references to items that were previously behind it.
Generally, these would be the same and it would manifest as
double entries in items_behind.

Change-Id: Ibc1447867df4c6fc7b4fe954770a06c7c24fadc4
changes/17/47617/1
James E. Blair 9 years ago
parent
commit
0045126c38
  1. 1
      zuul/model.py

1
zuul/model.py

@ -435,6 +435,7 @@ class ChangeQueue(object):
item_behind.item_ahead = item.item_ahead
# Add to new location
item.item_ahead = item_ahead
item.items_behind = []
if item.item_ahead:
item.item_ahead.items_behind.append(item)
return True

Loading…
Cancel
Save