change flag is_active after authorization

This commit is contained in:
Anatoly 2019-09-09 18:00:17 +03:00
parent 89830ffdac
commit 40605ff123
2 changed files with 2 additions and 7 deletions

View File

@ -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

View File

@ -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()