sonar issues

This commit is contained in:
jain
2023-07-17 17:00:33 +05:30
parent 1399b585e8
commit 6d6d21137f
5 changed files with 25 additions and 5 deletions

View File

@ -214,7 +214,7 @@ class ForgotPasswordAPIView(views.APIView):
User.objects.get(email=email)
except User.DoesNotExist:
return custom_error_response(ERROR_CODE['2004'], response_status=status.HTTP_404_NOT_FOUND)
verification_code = ''.join([str(random.randrange(9)) for _ in range(6)])
verification_code = generate_otp()
# Send the verification code to the user's email
from_email = settings.EMAIL_FROM_ADDRESS
recipient_list = [email]