From 99023088e70c6db684785ab6a1a8b11331058efd Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 10 Jun 2024 13:41:52 -0500 Subject: Use new db resultset conversion functions. --- gn_auth/auth/authorisation/roles/models.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gn_auth/auth/authorisation/roles') diff --git a/gn_auth/auth/authorisation/roles/models.py b/gn_auth/auth/authorisation/roles/models.py index 53c0378..94ad2d1 100644 --- a/gn_auth/auth/authorisation/roles/models.py +++ b/gn_auth/auth/authorisation/roles/models.py @@ -13,7 +13,7 @@ from ...db import sqlite3 as db from ...authentication.users import User from ..checks import authorised_p -from ..privileges import Privilege +from ..privileges import Privilege, db_row_to_privilege @dataclass(frozen=True) @@ -104,9 +104,7 @@ def __organise_privileges__(resources, row) -> dict: role.role_id, role.role_name, role.user_editable, - role.privileges + (Privilege( - row["privilege_id"], - row["privilege_description"]),) + role.privileges + (db_row_to_privilege(row),) ) } } -- cgit v1.2.3