aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/authtoken/serializers.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/authtoken/serializers.py')
-rw-r--r--rest_framework/authtoken/serializers.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/rest_framework/authtoken/serializers.py b/rest_framework/authtoken/serializers.py
index a808d0a3..f31dded1 100644
--- a/rest_framework/authtoken/serializers.py
+++ b/rest_framework/authtoken/serializers.py
@@ -18,13 +18,13 @@ class AuthTokenSerializer(serializers.Serializer):
if user:
if not user.is_active:
msg = _('User account is disabled.')
- raise exceptions.ValidationFailed(msg)
+ raise exceptions.ValidationError(msg)
else:
msg = _('Unable to log in with provided credentials.')
- raise exceptions.ValidationFailed(msg)
+ raise exceptions.ValidationError(msg)
else:
msg = _('Must include "username" and "password"')
- raise exceptions.ValidationFailed(msg)
+ raise exceptions.ValidationError(msg)
attrs['user'] = user
return attrs