From 3f5b7ef490b82ab79e3f72ebc5546c9a4118a920 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 2 Nov 2023 15:31:53 +0300 Subject: pylint: Fix linting errors. --- gn_auth/auth/authorisation/resources/inbredset/views.py | 1 - gn_auth/auth/authorisation/resources/views.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'gn_auth/auth') diff --git a/gn_auth/auth/authorisation/resources/inbredset/views.py b/gn_auth/auth/authorisation/resources/inbredset/views.py index c3669e6..444c442 100644 --- a/gn_auth/auth/authorisation/resources/inbredset/views.py +++ b/gn_auth/auth/authorisation/resources/inbredset/views.py @@ -3,7 +3,6 @@ from flask import jsonify, Response, Blueprint from gn_auth.auth.db import sqlite3 as db from gn_auth.auth.db.sqlite3 import with_db_connection -from gn_auth.auth.authentication.oauth2.resource_server import require_oauth iset = Blueprint("inbredset", __name__) diff --git a/gn_auth/auth/authorisation/resources/views.py b/gn_auth/auth/authorisation/resources/views.py index 60c751c..c5da257 100644 --- a/gn_auth/auth/authorisation/resources/views.py +++ b/gn_auth/auth/authorisation/resources/views.py @@ -341,14 +341,14 @@ def resources_authorisation(): res.resource_id for res in with_db_connection(public_resources) if res.resource_id in resource_ids) with require_oauth.acquire("profile resource") as the_token: - resources = with_db_connection(lambda conn: user_roles_on_resources( + the_resources = with_db_connection(lambda conn: user_roles_on_resources( conn, the_token.user, resource_ids)) resp = jsonify({ str(resid): { "public-read": resid in pubres, "roles": tuple( dictify(rol) for rol in - resources.get(resid, {}).get("roles", tuple())) + the_resources.get(resid, {}).get("roles", tuple())) } for resid in resource_ids }) except _HTTPException as _httpe: -- cgit v1.2.3