Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in link sso_id to email logic #91

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <[email protected]>",
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
Loading