From 162a9d66e84a8892c59d80c85735592eb9053cce Mon Sep 17 00:00:00 2001 From: Alexander Berger Date: Tue, 13 Aug 2024 13:22:04 -0400 Subject: [PATCH] Fix bug in link sso_id to email logic --- pyproject.toml | 2 +- src/geneweaver/api/dependencies.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9e3664e..8297953 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "geneweaver-api" -version = "0.8.0a4" +version = "0.8.0a5" description = "The Geneweaver API" authors = [ "Alexander Berger ", diff --git a/src/geneweaver/api/dependencies.py b/src/geneweaver/api/dependencies.py index 48bddbc..bc40faa 100644 --- a/src/geneweaver/api/dependencies.py +++ b/src/geneweaver/api/dependencies.py @@ -82,7 +82,8 @@ def _get_user_details(cursor: Cursor, user: UserInternal) -> UserInternal: detail="Email and SSO ID Mismatch. Please contact and administrator." ) from e elif db_user.email_exists(cursor, user.email): - user.id = db_user.link_user_id_with_sso_id(cursor, user.id, user.sso_id) + user.id = db_user.by_email(cursor, user.email)[0]["usr_id"] + _ = db_user.link_user_id_with_sso_id(cursor, user.id, user.sso_id) else: if not user.name: user.name = user.email