From 9007a923eb2b244aec74a7474706b664c5f66b3a Mon Sep 17 00:00:00 2001 From: Lina Date: Thu, 21 Nov 2024 15:31:19 +0100 Subject: [PATCH 1/2] Hotfix users --- controller/user/manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controller/user/manager.py b/controller/user/manager.py index dd804947..df1094b8 100644 --- a/controller/user/manager.py +++ b/controller/user/manager.py @@ -128,7 +128,8 @@ def __migrate_kratos_users(): for user_database in users_database: user_id = str(user_database.id) user_identity = users_kratos[user_id]["identity"] - + if users_kratos[user_id] is None: + continue if user_database.email != user_identity["traits"]["email"]: user_database.email = user_identity["traits"]["email"] if ( From ba5d28f1771a92ac866d31f146835cc1cabd85e2 Mon Sep 17 00:00:00 2001 From: Lina Date: Thu, 21 Nov 2024 15:33:21 +0100 Subject: [PATCH 2/2] fix created_at --- fast_api/routes/organization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fast_api/routes/organization.py b/fast_api/routes/organization.py index 3cec77d4..322117cd 100644 --- a/fast_api/routes/organization.py +++ b/fast_api/routes/organization.py @@ -289,7 +289,7 @@ def get_mapped_sorted_paginated_users( "organization": user.organization_name, "email": user.email, "verified": user.verified, - "created_at": user.created_at.isoformat(), + "created_at": user.created_at.isoformat() if user.created_at else None, "metadata_public": user.metadata_public, "sso_provider": user.sso_provider, }