Skip to content

Commit abac58c

Browse files
committed
FIX github accounts that do not have public names
1 parent 583afb1 commit abac58c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/anubis/views/public/auth.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ def public_github_oauth():
169169

170170
# Get minimal information for setting username
171171
github_username = github_user_info["login"].strip()
172-
name = github_user_info['name'].strip()
173172

174173
# If user exists
175174
if current_user is not None:
@@ -188,6 +187,7 @@ def public_github_oauth():
188187

189188
# Grab email to use as netid
190189
github_netid = f"github{github_user_info['id']}"
190+
name = github_user_info['name'].strip() if 'name' in github_user_info else github_netid
191191

192192
# Create user
193193
user = User(

0 commit comments

Comments
 (0)