fix(login)

This commit is contained in:
A'zamov Samandar
2025-12-06 15:09:54 +05:00
parent 9d494ab34e
commit 3aa20fdaa1
4 changed files with 43 additions and 18 deletions

View File

@@ -9,12 +9,6 @@ OTP_SIZE = env.int("OTP_SIZE", 4)
class LoginSerializer(serializers.Serializer):
phone = serializers.CharField(max_length=255)
def validate_phone(self, value):
user = get_user_model().objects.filter(phone=value, validated_at__isnull=False).exists()
if not user:
raise exceptions.ValidationError(_("Phone Not Found"))
return value
class RegisterSerializer(serializers.ModelSerializer):
phone = serializers.CharField(max_length=255)