From 36c03ed6252791afbee4e0dd98c37d85ff2e9f4f Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 28 Jul 2025 12:44:49 -0500 Subject: Only include the group if the user is a member of one. --- gn_auth/auth/authorisation/users/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gn_auth/auth/authorisation/users/views.py') diff --git a/gn_auth/auth/authorisation/users/views.py b/gn_auth/auth/authorisation/users/views.py index 91e459d..4061e07 100644 --- a/gn_auth/auth/authorisation/users/views.py +++ b/gn_auth/auth/authorisation/users/views.py @@ -75,7 +75,7 @@ def user_details() -> Response: False, lambda grp: grp)# type: ignore[arg-type] return jsonify({ **user_dets, - "group": asdict(the_group) if the_group else False + **({"group": asdict(the_group)} if the_group else {}) }) @users.route("/roles", methods=["GET"]) -- cgit 1.4.1