diff --git a/apps/users/models.py b/apps/users/models.py index ec4686e..077acf9 100644 --- a/apps/users/models.py +++ b/apps/users/models.py @@ -154,8 +154,8 @@ class User(AbstractUser): def set_otp(self): if self.otp_expire and (self.otp_expire + timedelta(seconds=MAX_OTP_VALID_DURATION)) > timezone.now(): raise Exception(_('otp expire time not reached.')) - # self._otp = ''.join(random.choice('0123456789') for _ in range(5)) - self._otp = '77501' + self._otp = ''.join(random.choice('0123456789') for _ in range(5)) + # self._otp = '77501' self.otp = make_password(self._otp) self.otp_expire = timezone.now() + timedelta(seconds=MAX_OTP_VALID_DURATION) self.otp_try = 0