mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
_remove task skip item ids that are not in _task_name_by_item_id
This commit is contained in:
parent
56acc5026e
commit
0fc5a542c8
1 changed files with 4 additions and 0 deletions
|
|
@ -1797,7 +1797,11 @@ class AssetItem(BaseItem):
|
||||||
item.setData(False, DUPLICATED_ROLE)
|
item.setData(False, DUPLICATED_ROLE)
|
||||||
|
|
||||||
def _remove_task(self, item):
|
def _remove_task(self, item):
|
||||||
|
# This method is probably obsolete with changed logic and added
|
||||||
|
# `on_task_remove_state_change` method.
|
||||||
item_id = item.data(IDENTIFIER_ROLE)
|
item_id = item.data(IDENTIFIER_ROLE)
|
||||||
|
if item_id not in self._task_name_by_item_id:
|
||||||
|
return
|
||||||
|
|
||||||
name = self._task_name_by_item_id.pop(item_id)
|
name = self._task_name_by_item_id.pop(item_id)
|
||||||
self._task_items_by_name[name].remove(item)
|
self._task_items_by_name[name].remove(item)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue