diff options
author | Frederick Muriuki Muriithi | 2025-07-29 14:36:55 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-07-29 14:36:55 -0500 |
commit | 94d211e354e7be675857e3aacd1734f3164a371e (patch) | |
tree | 9b1e4a34691c6766067ba5f65bc40e0578739a8a /gn_auth/auth/authorisation/resources/views.py | |
parent | 2402dcf7577961c634bc36181b26803dff785c11 (diff) | |
download | gn-auth-94d211e354e7be675857e3aacd1734f3164a371e.tar.gz |
Fix issues caught by code-linter.
Diffstat (limited to 'gn_auth/auth/authorisation/resources/views.py')
-rw-r--r-- | gn_auth/auth/authorisation/resources/views.py | 6 |
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, |