change flag is_active after authorization
This commit is contained in:
parent
89830ffdac
commit
40605ff123
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user