From 733a175c64e38cb983c2b95b946c0aad9df6c1b5 Mon Sep 17 00:00:00 2001 From: Matthew Evans <7916000+ml-evs@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:11:14 +0000 Subject: [PATCH] User registration: default display name to GitHub username when no profile name is set (closes #652) (#655) --- pydatalab/pydatalab/routes/v0_1/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydatalab/pydatalab/routes/v0_1/auth.py b/pydatalab/pydatalab/routes/v0_1/auth.py index 41a7d9ca8..363b28b74 100644 --- a/pydatalab/pydatalab/routes/v0_1/auth.py +++ b/pydatalab/pydatalab/routes/v0_1/auth.py @@ -381,7 +381,7 @@ def github_logged_in(blueprint, token): github_info = resp.json() github_user_id = str(github_info["id"]) username = str(github_info["login"]) - name = str(github_info["name"]) + name = str(github_info["name"] if github_info["name"] is not None else github_info["login"]) create_account: bool = False # Use the read:org scope to check if the user is a member of at least one of the allowed orgs