diff options
author | Frederick Muriuki Muriithi | 2024-11-22 10:02:40 -0600 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-11-22 10:17:19 -0600 |
commit | 463194da3cfc077513e98948dd31cfd60d2eb0e0 (patch) | |
tree | 90716f2a8e7b64772871df24e28f6c5a788deca4 /gn_auth/auth/authorisation/data/mrna.py | |
parent | cab78050064424d31534c3bba9c68080108dacd6 (diff) | |
download | gn-auth-463194da3cfc077513e98948dd31cfd60d2eb0e0.tar.gz |
Use code in gn_libs for MySQL/MariaDB connection.
Update the application to use the gn_libs code for connecting to the
database, rather than using a local module.
Diffstat (limited to 'gn_auth/auth/authorisation/data/mrna.py')
-rw-r--r-- | gn_auth/auth/authorisation/data/mrna.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gn_auth/auth/authorisation/data/mrna.py b/gn_auth/auth/authorisation/data/mrna.py index 60470a7..82a0f82 100644 --- a/gn_auth/auth/authorisation/data/mrna.py +++ b/gn_auth/auth/authorisation/data/mrna.py @@ -2,10 +2,11 @@ import uuid from dataclasses import asdict from typing import Iterable + +from gn_libs import mysqldb as gn3db from MySQLdb.cursors import DictCursor from gn_auth.auth.db import sqlite3 as authdb -from gn_auth.auth.db import mariadb as gn3db from gn_auth.auth.authorisation.checks import authorised_p from gn_auth.auth.authorisation.resources.groups.models import Group @@ -22,7 +23,7 @@ def linked_mrna_data(conn: authdb.DbConnection) -> Iterable[dict]: "group(s)."), oauth2_scope="profile group resource") def ungrouped_mrna_data(# pylint: disable=[too-many-arguments] - authconn: authdb.DbConnection, gn3conn: gn3db.DbConnection, + authconn: authdb.DbConnection, gn3conn: gn3db.Connection, search_query: str, selected: tuple[dict, ...] = tuple(), limit: int = 10000, offset: int = 0) -> tuple[ dict, ...]: |