From 360cc3bd259c5e1c123bf8095d8474213597971d Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 9 Jul 2025 08:36:42 -0500 Subject: Fix some linting issues. --- gn_auth/auth/authorisation/resources/groups/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gn_auth/auth/authorisation/resources/groups/models.py') diff --git a/gn_auth/auth/authorisation/resources/groups/models.py b/gn_auth/auth/authorisation/resources/groups/models.py index b8a5235..1d44ca4 100644 --- a/gn_auth/auth/authorisation/resources/groups/models.py +++ b/gn_auth/auth/authorisation/resources/groups/models.py @@ -237,9 +237,12 @@ def is_group_leader(conn: db.DbConnection, user: User, group: Group) -> bool: return "group-leader" in role_names -def __build_groups_list_query__(base: str, search: Optional[str] = None) -> tuple[str, tuple[Optional[str], ...]]: +def __build_groups_list_query__( + base: str, + search: Optional[str] = None +) -> tuple[str, tuple[Optional[str], ...]]: """Build up the query from given search terms.""" - if bool(search): + if search is not None and search.strip() != "": _search = search.strip() return ((f"{base} WHERE groups.group_name LIKE ? " "OR groups.group_metadata LIKE ?"), -- cgit v1.2.3