mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-30 18:09:59 +03:00
Fixed linting issues
This commit is contained in:
parent
b1bb75b816
commit
a2846c88ab
|
@ -16,7 +16,6 @@ class AuthTokenSerializer(serializers.Serializer):
|
|||
username = attrs.get('username')
|
||||
password = attrs.get('password')
|
||||
|
||||
|
||||
user = authenticate(request=self.context.get('request'),
|
||||
username=username, password=password)
|
||||
|
||||
|
@ -27,6 +26,5 @@ class AuthTokenSerializer(serializers.Serializer):
|
|||
msg = _('Unable to log in with provided credentials.')
|
||||
raise serializers.ValidationError(msg, code='authorization')
|
||||
|
||||
|
||||
attrs['user'] = user
|
||||
return attrs
|
||||
|
|
Loading…
Reference in New Issue
Block a user