diff options
author | Frederick Muriuki Muriithi | 2024-06-17 15:46:26 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-06-17 15:46:26 -0500 |
commit | 529932949c8631f3c3e64817123d67cd73d90d1e (patch) | |
tree | d677e4c473c59aacb70fb7a53b186218ed71bc81 /gn2/wqflask/oauth2 | |
parent | 2d0261add8df5a0b49e80eb2fab3a98f27871067 (diff) | |
download | genenetwork2-529932949c8631f3c3e64817123d67cd73d90d1e.tar.gz |
Fix error display logic
Diffstat (limited to 'gn2/wqflask/oauth2')
-rw-r--r-- | gn2/wqflask/oauth2/resources.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gn2/wqflask/oauth2/resources.py b/gn2/wqflask/oauth2/resources.py index 0befac85..7ebb82ad 100644 --- a/gn2/wqflask/oauth2/resources.py +++ b/gn2/wqflask/oauth2/resources.py @@ -409,11 +409,14 @@ def create_resource_role(resource_id: UUID): return render_ui("oauth2/create-role.html", **kwargs) def __fetch_resource_roles__(resource): - lambda error: __render__(resource_role_error=error), user = session.session_info()["user"] return oauth2_get( f"auth/resource/{resource_id}/users/{user['user_id']}" "/roles").either( + lambda error: { + "resource": resource, + "resource_role_error": process_error(error) + }, lambda roles: {"resource": resource, "roles": roles}) if request.method == "GET": |