fix filter bug

This commit is contained in:
Jakub Trllo 2022-02-22 17:18:04 +01:00
parent 48242818e3
commit c6df758275

View file

@ -736,7 +736,10 @@ class AssetRecursiveSortFilterModel(QtCore.QSortFilterProxyModel):
valid = True valid = True
if self._name_filter: if self._name_filter:
name = model.data(source_index, ASSET_NAME_ROLE) name = model.data(source_index, ASSET_NAME_ROLE)
if not re.search(self._name_filter, name, re.IGNORECASE): if (
name is None
or not re.search(self._name_filter, name, re.IGNORECASE)
):
valid = False valid = False
if valid and self._task_types_filter: if valid and self._task_types_filter: