diff options
author | Frederick Muriuki Muriithi | 2023-02-09 15:48:29 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-02-09 15:48:29 +0300 |
commit | 739c9cca55d93b2cbf200e816daf0800aaa187c8 (patch) | |
tree | 13c381e2619cba41ba5c74f8c8426920aff932d4 | |
parent | bcc845d44bac5866f021320cf15f0d0b2ca341c0 (diff) | |
download | genenetwork2-739c9cca55d93b2cbf200e816daf0800aaa187c8.tar.gz |
oauth2: fix variable name. Fetch join requests if there's no group.
-rw-r--r-- | wqflask/wqflask/oauth2/users.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wqflask/wqflask/oauth2/users.py b/wqflask/wqflask/oauth2/users.py index 94c3a4ce..28a495aa 100644 --- a/wqflask/wqflask/oauth2/users.py +++ b/wqflask/wqflask/oauth2/users.py @@ -24,13 +24,15 @@ def user_profile(): **kwargs) def __roles_success__(roles): + if bool(usr_dets.get("group")): + return __render__(usr_dets, roles) return oauth2_get("oauth2/user/group/join-request").either( lambda err: __render__( user_details, group_join_error=process_error(err)), - lambda gjr: __render__(user_details, group_join_request=gjr)) + lambda gjr: __render__(usr_dets, group_join_request=gjr)) return oauth2_get("oauth2/user/roles").either( - lambda err: __render__(user_details, role_error=process_error(err)), + lambda err: __render__(usr_dets, role_error=process_error(err)), __roles_success__) @users.route("/request-add-to-group", methods=["POST"]) |