From 94d211e354e7be675857e3aacd1734f3164a371e Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 29 Jul 2025 14:36:55 -0500 Subject: Fix issues caught by code-linter. --- gn_auth/auth/authorisation/resources/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gn_auth/auth/authorisation/resources/views.py') diff --git a/gn_auth/auth/authorisation/resources/views.py b/gn_auth/auth/authorisation/resources/views.py index 920ea76..c4774dc 100644 --- a/gn_auth/auth/authorisation/resources/views.py +++ b/gn_auth/auth/authorisation/resources/views.py @@ -75,8 +75,7 @@ def create_resource() -> Response: resource_name = form.get("resource_name") resource_category_id = UUID(form.get("resource_category")) db_uri = app.config["AUTH_DB"] - with (db.connection(db_uri) as conn, - db.cursor(conn) as cursor): + with db.connection(db_uri) as conn: try: group = user_group(conn, the_token.user).maybe( False, lambda grp: grp)# type: ignore[misc, arg-type] @@ -686,7 +685,8 @@ def delete_resource() -> Response: form = request_json() try: resource_id = UUID(form.get("resource_id")) - # TODO Update user-levels promotion/demotion to grant/revoke (system:resource:*) to/from admin users + # TODO Update user-levels promotion/demotion to grant/revoke + # (system:resource:*) to/from admin users if not authorised_for_spec( conn, the_token.user.user_id, -- cgit 1.4.1