From 40605ff12344a17727dc1f2d2ac1dc2750701598 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Mon, 9 Sep 2019 18:00:17 +0300 Subject: [PATCH] change flag is_active after authorization --- apps/account/models.py | 7 ++----- apps/authorization/views/common.py | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/apps/account/models.py b/apps/account/models.py index ee4d5d9d..b0ae79d6 100644 --- a/apps/account/models.py +++ b/apps/account/models.py @@ -24,15 +24,12 @@ class UserManager(BaseUserManager): use_in_migrations = False - def make(self, username: str, email: str, password: str, - newsletter: bool, is_active: bool = False) -> object: + def make(self, username: str, email: str, password: str, newsletter: bool) -> object: """Register new user""" obj = self.model( username=username, email=email, - newsletter=newsletter, - is_active=is_active - ) + newsletter=newsletter) obj.set_password(password) obj.save() return obj diff --git a/apps/authorization/views/common.py b/apps/authorization/views/common.py index bd6c8a26..c77dd63e 100644 --- a/apps/authorization/views/common.py +++ b/apps/authorization/views/common.py @@ -182,8 +182,6 @@ class VerifyEmailConfirmView(JWTGenericViewMixin): raise utils_exceptions.NotValidTokenError() # Approve email status user.confirm_email() - # Set user status as active - user.approve() return Response(status=status.HTTP_200_OK) else: raise utils_exceptions.UserNotFoundError()