From f47781a330720efb7d2f026d4a324bc8e89fca2e Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Fri, 22 Nov 2019 16:48:15 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E5=8F=91=E9=80=81=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E5=AF=86=E9=92=A5=E9=82=AE=E4=BB=B6=E6=97=B6=EF=BC=8C=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E7=94=A8=E6=88=B7=E5=85=AC=E9=92=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/users/api/user.py | 2 +- apps/users/views/login.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/users/api/user.py b/apps/users/api/user.py index 2a033915c..4545f629b 100644 --- a/apps/users/api/user.py +++ b/apps/users/api/user.py @@ -119,7 +119,7 @@ class UserResetPKApi(UserQuerysetMixin, generics.UpdateAPIView): def perform_update(self, serializer): from ..utils import send_reset_ssh_key_mail user = self.get_object() - user.is_public_key_valid = False + user.public_key = None user.save() send_reset_ssh_key_mail(user) diff --git a/apps/users/views/login.py b/apps/users/views/login.py index 046bc9415..3f0f88e8f 100644 --- a/apps/users/views/login.py +++ b/apps/users/views/login.py @@ -142,7 +142,6 @@ class UserFirstLoginView(PermissionsMixin, SessionWizardView): if field.value(): setattr(user, field.name, field.value()) user.is_first_login = False - user.is_public_key_valid = True user.save() context = { 'user_guide_url': settings.USER_GUIDE_URL