mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 17:16:34 +03:00
Merge pull request #56 from safaktrgt/master
change PasswordResetConfirmSerializer setpasswordform exception from token invalid value error to form validation error
This commit is contained in:
commit
d4d390e74d
|
@ -110,8 +110,7 @@ class PasswordResetConfirmSerializer(serializers.Serializer):
|
|||
self.set_password_form = self.set_password_form_class(user=self.user,
|
||||
data=attrs)
|
||||
if not self.set_password_form.is_valid():
|
||||
raise ValidationError({'token': ['Invalid value']})
|
||||
|
||||
raise serializers.ValidationError(self.set_password_form.errors)
|
||||
if not default_token_generator.check_token(self.user, attrs['token']):
|
||||
raise ValidationError({'token': ['Invalid value']})
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user