Make email in password reset serializer Case unsensetive

This commit is contained in:
Poderyagin Egor 2015-12-10 18:13:28 +06:00
parent f1e96be7e6
commit 9b7ede752b

View File

@ -115,7 +115,7 @@ class PasswordResetSerializer(serializers.Serializer):
if not self.reset_form.is_valid():
raise serializers.ValidationError(_('Error'))
if not UserModel.objects.filter(email=value).exists():
if not UserModel.objects.filter(email__iexact=value).exists():
raise serializers.ValidationError(_('Invalid e-mail address'))
return value