Skip to content

Commit

Permalink
Merge branch 'master' into fix_missing_jobs_on_monitor_jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonfigueiredo committed Sep 27, 2023
2 parents 57afbb3 + 9064c33 commit 21a1f06
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 21a1f06

Please sign in to comment.