From 41ebc1ce0ba42306d12849e6bad79d42d11ef365 Mon Sep 17 00:00:00 2001 From: liangliangyy Date: Fri, 24 Mar 2017 21:56:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Doauth=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=87=8D=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oauth/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauth/views.py b/oauth/views.py index cc82d97..6089b7d 100644 --- a/oauth/views.py +++ b/oauth/views.py @@ -41,7 +41,7 @@ def authorize(request): if email: author = None try: - author = get_user_model().objects.get(email=email) + author = get_user_model().objects.get(id=user.author_id) except ObjectDoesNotExist: pass if not author: