diff options
author | Frederick Muriuki Muriithi | 2025-07-28 12:44:49 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-07-28 12:44:49 -0500 |
commit | 36c03ed6252791afbee4e0dd98c37d85ff2e9f4f (patch) | |
tree | 9b6e1bb364340cab3ebaa823fca26d0c7992294b | |
parent | 94159b250b400e6410b060717bf3dcebc74da0a2 (diff) | |
download | gn-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.py | 2 |
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"]) |