mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-26 02:53:46 +03:00
replaced serializer.object with serializer.validated_data
This commit is contained in:
parent
064d49fdef
commit
36c41c151f
|
@ -31,7 +31,7 @@ class Login(GenericAPIView):
|
||||||
response_serializer = TokenSerializer
|
response_serializer = TokenSerializer
|
||||||
|
|
||||||
def login(self):
|
def login(self):
|
||||||
self.user = self.serializer.object['user']
|
self.user = self.serializer.validated_data['user']
|
||||||
self.token, created = self.token_model.objects.get_or_create(
|
self.token, created = self.token_model.objects.get_or_create(
|
||||||
user=self.user)
|
user=self.user)
|
||||||
if getattr(settings, 'REST_SESSION_LOGIN', True):
|
if getattr(settings, 'REST_SESSION_LOGIN', True):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user