From 41cbd3e0f6ca2934bf60998dad8aff6f7e0c73dd Mon Sep 17 00:00:00 2001 From: Bai Date: Mon, 13 Apr 2020 18:21:49 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9OpenID=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=8E=B7=E5=8F=96username=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/backends/openid/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/authentication/backends/openid/models.py b/apps/authentication/backends/openid/models.py index ca50ee266..a945e8eb3 100644 --- a/apps/authentication/backends/openid/models.py +++ b/apps/authentication/backends/openid/models.py @@ -157,7 +157,7 @@ class Client(object): userinfo = self.get_userinfo(token=token_response['access_token']) with transaction.atomic(): name = userinfo.get('name', '') - username = userinfo.get('preferred_username', ''), + username = userinfo.get('preferred_username', '') email = userinfo.get('email', '') email = construct_user_email(username, email)