Fixed linting issues

This commit is contained in:
Mark Winterbottom 2018-10-18 08:25:13 +01:00
parent b1bb75b816
commit a2846c88ab
No known key found for this signature in database
GPG Key ID: 766B4B600637B315

View File

@ -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