From 00c3c34d15e126e661ab9b3494c0d61b31dda145 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Mon, 8 Jan 2024 18:15:34 -0300 Subject: [PATCH] [view.qt] fix: name filter not working for camel case --- bauh/view/qt/view_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bauh/view/qt/view_index.py b/bauh/view/qt/view_index.py index 46076f25..00041c5e 100644 --- a/bauh/view/qt/view_index.py +++ b/bauh/view/qt/view_index.py @@ -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) @@ -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)