Skip to content

Commit

Permalink
Merge pull request #91 from TheJacksonLaboratory/G3-348-geneweaver-ap…
Browse files Browse the repository at this point in the history
…i-is-updated-to-use-thejacksonlaboratory-auth-0-tenant

Fix bug in link sso_id to email logic
  • Loading branch information
bergsalex authored Aug 13, 2024
2 parents 04b5c45 + f9dd699 commit 151ce1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "geneweaver-api"
version = "0.8.0a4"
version = "0.8.0a5"
description = "The Geneweaver API"
authors = [
"Alexander Berger <alexander.berger@jax.org>",
Expand Down
3 changes: 2 additions & 1 deletion src/geneweaver/api/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 151ce1b

Please sign in to comment.