From a8ebba8266618ec53fe485ee84d09d0cdff898a1 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 27 Sep 2023 10:09:53 +0300 Subject: typing: fix and ignore typing issues. --- gn_auth/auth/authorisation/resources/groups/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gn_auth/auth/authorisation/resources/groups/views.py') diff --git a/gn_auth/auth/authorisation/resources/groups/views.py b/gn_auth/auth/authorisation/resources/groups/views.py index ba34040..96cfb67 100644 --- a/gn_auth/auth/authorisation/resources/groups/views.py +++ b/gn_auth/auth/authorisation/resources/groups/views.py @@ -324,8 +324,12 @@ def group_privileges(): group_level_roles = tuple( Privilege(row["privilege_id"], row["privilege_description"]) for row in cursor.fetchall()) - return tuple(privilege for arole in this_user_roles - for privilege in arole.privileges) + group_level_roles + + ## the `user_roles(...)` function changed thus this entire function + ## needs to change or be obsoleted -- also remove the ignore below + return tuple( + privilege for arole in this_user_roles + for privilege in arole.privileges) + group_level_roles #type: ignore[attr-defined] return jsonify(tuple( dictify(priv) for priv in with_db_connection(__list_privileges__))) -- cgit v1.2.3