mirror of
https://github.com/simple-login/app.git
synced 2025-02-23 07:13:18 +08:00
fix name can be absent in github data
https://sentry.io/organizations/son/issues/1201398007/?project=1478143&query=is%3Aunresolved
This commit is contained in:
parent
673b9e72ee
commit
c5b65c108b
1 changed files with 3 additions and 1 deletions
|
@ -88,7 +88,9 @@ def github_callback():
|
|||
# create user
|
||||
else:
|
||||
LOG.d("create github user")
|
||||
user = User.create(email=email, name=github_user_data["name"], activated=True)
|
||||
user = User.create(
|
||||
email=email, name=github_user_data.get("name") or "", activated=True
|
||||
)
|
||||
db.session.commit()
|
||||
login_user(user)
|
||||
email_utils.send_welcome_email(user.email, user.name)
|
||||
|
|
Loading…
Reference in a new issue