about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-07-28 12:44:49 -0500
committerFrederick Muriuki Muriithi2025-07-28 12:44:49 -0500
commit36c03ed6252791afbee4e0dd98c37d85ff2e9f4f (patch)
tree9b6e1bb364340cab3ebaa823fca26d0c7992294b
parent94159b250b400e6410b060717bf3dcebc74da0a2 (diff)
downloadgn-auth-36c03ed6252791afbee4e0dd98c37d85ff2e9f4f.tar.gz
Only include the group if the user is a member of one.
-rw-r--r--gn_auth/auth/authorisation/users/views.py2
1 files changed, 1 insertions, 1 deletions
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"])