Skip to content

Commit

Permalink
[cuegui] Bug fix when unmonitor finished jobs with dependents
Browse files Browse the repository at this point in the history
- AbstractTreeWidget.py > _removeItem(): Check if object ID exists before delete it
  • Loading branch information
ramonfigueiredo committed Sep 13, 2023
1 parent c1f335d commit 9064c33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cuegui/cuegui/AbstractTreeWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,10 @@ def _removeItem(self, item):
self.takeTopLevelItem(self.indexOfTopLevelItem(item))
objectClass = item.rpcObject.__class__.__name__
objectId = item.rpcObject.id()
del self._items['{}.{}'.format(objectClass, objectId)]

# Check if object ID exists before delete it
if objectId in self._items:
del self._items['{}.{}'.format(objectClass, objectId)]

def removeAllItems(self):
"""Removes all items from the tree."""
Expand Down

0 comments on commit 9064c33

Please sign in to comment.