fixing play
All checks were successful
Deploy Beta (NATIVE) / deploy (push) Successful in 31s

This commit is contained in:
vickytechkey 2026-08-14 15:26:25 +05:30
parent 6c4f174ad4
commit 627e2636eb

View file

@ -44,7 +44,11 @@ class RegisterView(APIView):
logger.info("Generated email OTP for %s: %s", user.username, otp_email)
# Temporarily save OTPs to profile so frontend can query them until email service is implemented
profile.phone = f"{profile.phone} (OTP: {otp_phone})"
# Do not save the OTP suffix in the phone field if it exceeds the 20-character database limit
otp_suffix = f" (OTP: {otp_phone})"
current_phone = profile.phone or ""
if len(current_phone) + len(otp_suffix) <= 20:
profile.phone = f"{current_phone}{otp_suffix}"
profile.save()
# Store OTP hashes