mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 01:40:38 +01: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
|
# create user
|
||||||
else:
|
else:
|
||||||
LOG.d("create github user")
|
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()
|
db.session.commit()
|
||||||
login_user(user)
|
login_user(user)
|
||||||
email_utils.send_welcome_email(user.email, user.name)
|
email_utils.send_welcome_email(user.email, user.name)
|
||||||
|
|
Loading…
Reference in a new issue