diff options
| author | Frederick Muriuki Muriithi | 2026-08-27 10:51:16 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-08-27 12:51:31 -0500 |
| commit | 800913ddee45fcb0b0e3a9d8c3917d3cf9644ca4 (patch) | |
| tree | 30b78dca5002899cce2d2f875bffe70a74933c87 /gn_auth/auth/authorisation/users | |
| parent | c9d6594750ad7a01b1e23af77e4f847e23f26306 (diff) | |
| download | gn-auth-800913ddee45fcb0b0e3a9d8c3917d3cf9644ca4.tar.gz | |
Cleanup deprecation warnings: Switch to gn_libs.sqlite3
The gn_auth.auth.db.sqlite3 module is deprecated and should be removed. This cleanup goes a ways towards that goal.
Diffstat (limited to 'gn_auth/auth/authorisation/users')
| -rw-r--r-- | gn_auth/auth/authorisation/users/views.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gn_auth/auth/authorisation/users/views.py b/gn_auth/auth/authorisation/users/views.py index 5cdb482..e454a80 100644 --- a/gn_auth/auth/authorisation/users/views.py +++ b/gn_auth/auth/authorisation/users/views.py @@ -23,6 +23,8 @@ from flask import ( make_response, render_template) +from gn_libs import sqlite3 as db +from gn_libs.sqlite3 import with_db_connection from gn_libs.privileges.system import can_create_or_delete_user from gn_libs.privileges.resources import can_assign_role @@ -30,8 +32,6 @@ from gn_auth.smtp import send_message, build_email_message from gn_auth.auth.requests import request_json -from gn_auth.auth.db import sqlite3 as db -from gn_auth.auth.db.sqlite3 import with_db_connection from gn_auth.auth.authorisation.resources.system.models import ( system_resource, @@ -366,8 +366,9 @@ def user_join_request_exists(): "exists": False } with require_oauth.acquire("profile group") as the_token: - return jsonify(with_db_connection(partial( - __request_exists__, user=the_token.user))) + return jsonify(with_db_connection( + current_app.config["SQL_URI"], + partial(__request_exists__, user=the_token.user))) @users.route("/list", methods=["GET"]) @require_oauth("profile user") |
