diff options
| -rw-r--r-- | gn_auth/auth/authorisation/resources/groups/models.py | 1 | ||||
| -rw-r--r-- | gn_auth/auth/authorisation/roles/views.py | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/gn_auth/auth/authorisation/resources/groups/models.py b/gn_auth/auth/authorisation/resources/groups/models.py index 68f4ea0..60d4634 100644 --- a/gn_auth/auth/authorisation/resources/groups/models.py +++ b/gn_auth/auth/authorisation/resources/groups/models.py @@ -18,7 +18,6 @@ from gn_auth.auth.authentication.users import User, user_by_id from gn_auth.auth.authorisation.checks import authorised_p from gn_auth.auth.authorisation.privileges import Privilege from gn_auth.auth.authorisation.resources.errors import MissingGroupError -from gn_auth.auth.authorisation.resources.system.models import system_resource from gn_auth.auth.authorisation.resources.base import ( Resource, resource_from_dbrow) diff --git a/gn_auth/auth/authorisation/roles/views.py b/gn_auth/auth/authorisation/roles/views.py index dda6f87..163d67e 100644 --- a/gn_auth/auth/authorisation/roles/views.py +++ b/gn_auth/auth/authorisation/roles/views.py @@ -17,9 +17,7 @@ roles = Blueprint("roles", __name__) @require_oauth("profile role") def view_role(role_id: uuid.UUID) -> Response: """Retrieve a user role with id `role_id`""" - def __error__(exc: Exception): - raise exc - with require_oauth.acquire("profile role") as the_token: + with require_oauth.acquire("profile role") as _token: db_uri = current_app.config["AUTH_DB"] with db.connection(db_uri) as conn: return jsonify(asdict(role_by_id(conn, role_id))) |
