From a93b9599d6e342f8fd588022ca14336465f7ff7c Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 10 Feb 2023 14:07:41 +0300 Subject: Return empty tuple rather than Nothing When user has no roles assigned, return an empty tuple rather than pymonad.maybe.Nothing to ease maintenance. --- gn3/auth/authorisation/roles/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gn3/auth/authorisation/roles/views.py') diff --git a/gn3/auth/authorisation/roles/views.py b/gn3/auth/authorisation/roles/views.py index 975fb19..3670aab 100644 --- a/gn3/auth/authorisation/roles/views.py +++ b/gn3/auth/authorisation/roles/views.py @@ -13,7 +13,7 @@ from ...authentication.oauth2.resource_server import require_oauth roles = Blueprint("roles", __name__) @roles.route("/view/", methods=["GET"]) -@require_oauth("role") +@require_oauth("profile role") def view_role(role_id: uuid.UUID) -> Response: """Retrieve a user role with id `role_id`""" def __error__(exc: Exception): -- cgit v1.2.3