From fe1eff745e97fd03fecc19db5c22763ca348bff0 Mon Sep 17 00:00:00 2001 From: "S.Turgut" Date: Wed, 11 Mar 2015 12:05:45 +0200 Subject: [PATCH] change PasswordResetConfirmSerializer setpasswordform from token invalid value error to form validation error --- rest_auth/serializers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rest_auth/serializers.py b/rest_auth/serializers.py index e0ab909..db1e4cb 100644 --- a/rest_auth/serializers.py +++ b/rest_auth/serializers.py @@ -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']})