Skip to content

Commit

Permalink
[view.qt] fix: name filter not working for camel case
Browse files Browse the repository at this point in the history
  • Loading branch information
vinifmor committed Jan 8, 2024
1 parent f2eba80 commit 00c3c34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bauh/view/qt/view_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def generate_queries(filters: PackageFilters) -> Generator[Tuple[Optional[Union[
chars_query = None

if filters.name:
chars_query = filters.name.lower()
chars_query = filters.name.strip().lower()

installed_queries = (1,) if filters.only_installed else (1, 0)
apps_queries = (1,) if filters.only_apps else (1, 0)
Expand Down Expand Up @@ -129,7 +129,7 @@ def query_packages(index: dict, filters: PackageFilters) -> Generator[PackageVie
continue

# checking if the package name contains the chars query
if query[6] in pkgv.model.name:
if query[6] in pkgv.model.name.lower():
yield pkgv
yield_count += 1
yielded_pkgs[pkgv.model.get_type()].add(pkgv.model.id)
Expand Down

0 comments on commit 00c3c34

Please sign in to comment.