mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
Fix missing message in ValidationError
This commit is contained in:
parent
c15dab903d
commit
ccf3c508bd
|
@ -18,7 +18,7 @@ class AuthTokenSerializer(serializers.Serializer):
|
||||||
if user:
|
if user:
|
||||||
if not user.is_active:
|
if not user.is_active:
|
||||||
msg = _('User account is disabled.')
|
msg = _('User account is disabled.')
|
||||||
raise serializers.ValidationError()
|
raise serializers.ValidationError(msg)
|
||||||
attrs['user'] = user
|
attrs['user'] = user
|
||||||
return attrs
|
return attrs
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user