aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authorisation/resources/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth/authorisation/resources/models.py')
-rw-r--r--gn_auth/auth/authorisation/resources/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gn_auth/auth/authorisation/resources/models.py b/gn_auth/auth/authorisation/resources/models.py
index 3693ad1..7ebf5f7 100644
--- a/gn_auth/auth/authorisation/resources/models.py
+++ b/gn_auth/auth/authorisation/resources/models.py
@@ -1,4 +1,5 @@
"""Handle the management of resources."""
+from dataclasses import asdict
from uuid import UUID, uuid4
from functools import reduce, partial
from sqlite3 import Row
@@ -341,7 +342,7 @@ def assign_resource_user(
str(resource.resource_id)))
return {
"resource": dictify(resource),
- "user": dictify(user),
+ "user": asdict(user),
"role": dictify(role),
"description": (
f"The user '{user.name}'({user.email}) was assigned the "
@@ -365,7 +366,7 @@ def unassign_resource_user(
str(resource.resource_id)))
return {
"resource": dictify(resource),
- "user": dictify(user),
+ "user": asdict(user),
"role": dictify(role),
"description": (
f"The user '{user.name}'({user.email}) had the "