diff options
Diffstat (limited to 'gn3/auth/authorisation/roles/models.py')
-rw-r--r-- | gn3/auth/authorisation/roles/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gn3/auth/authorisation/roles/models.py b/gn3/auth/authorisation/roles/models.py index bb7ea73..be04985 100644 --- a/gn3/auth/authorisation/roles/models.py +++ b/gn3/auth/authorisation/roles/models.py @@ -17,7 +17,7 @@ class Role(NamedTuple): """Class representing a role: creates immutable objects.""" role_id: UUID role_name: str - privileges: Iterable[Privilege] + privileges: tuple[Privilege, ...] def dictify(self) -> dict[str, Any]: """Return a dict representation of `Role` objects.""" @@ -44,7 +44,7 @@ def create_role( RETURNS: An immutable `gn3.auth.authorisation.roles.Role` object """ - role = Role(uuid4(), role_name, privileges) + role = Role(uuid4(), role_name, tuple(privileges)) cursor.execute( "INSERT INTO roles(role_id, role_name) VALUES (?, ?)", |