mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-01 11:00:13 +03:00
Removed .get()
calls
This commit is contained in:
parent
2540894d26
commit
4440803620
|
@ -13,8 +13,8 @@ class AuthTokenSerializer(serializers.Serializer):
|
|||
)
|
||||
|
||||
def validate(self, attrs):
|
||||
username = attrs.get('username')
|
||||
password = attrs.get('password')
|
||||
username = attrs['username']
|
||||
password = attrs['password']
|
||||
|
||||
user = authenticate(request=self.context.get('request'),
|
||||
username=username, password=password)
|
||||
|
|
Loading…
Reference in New Issue
Block a user