about summary refs log tree commit diff
path: root/gn_auth/auth/authorisation/resources/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth/authorisation/resources/views.py')
-rw-r--r--gn_auth/auth/authorisation/resources/views.py6
1 files changed, 3 insertions, 3 deletions
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,