Skip to content

Commit

Permalink
FIX github accounts that do not have public names
Browse files Browse the repository at this point in the history
  • Loading branch information
wabscale committed Feb 6, 2024
1 parent 583afb1 commit abac58c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/anubis/views/public/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def public_github_oauth():

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

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

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

# Create user
user = User(
Expand Down

0 comments on commit abac58c

Please sign in to comment.