about summary refs log tree commit diff
path: root/gn_auth/auth/authorisation/data
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth/authorisation/data')
-rw-r--r--gn_auth/auth/authorisation/data/views.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gn_auth/auth/authorisation/data/views.py b/gn_auth/auth/authorisation/data/views.py
index e5c8fd6..9d59a70 100644
--- a/gn_auth/auth/authorisation/data/views.py
+++ b/gn_auth/auth/authorisation/data/views.py
@@ -2,6 +2,7 @@
 import sys
 import uuid
 import json
+from dataclasses import asdict
 from typing import Any
 from functools import partial
 
@@ -152,7 +153,7 @@ def authorisation() -> Response:
 
         return jsonify(tuple(
             {
-                "user": user._asdict(),
+                "user": asdict(user),
                 **{key:trait[key] for key in ("trait_fullname", "trait_name")},
                 "dataset_name": trait["db"]["dataset_name"],
                 "dataset_type": __translate__(trait["db"]["dataset_type"]),
@@ -377,7 +378,7 @@ def metadata_resources() -> Response:
             }
             return jsonify(
                 {
-                    "user": user._asdict(),
+                    "user": asdict(user),
                     "resource_id": resource_map.get(
                         request.json.get("name")  #type: ignore[union-attr]
                     ),