From 36c41c151f1afc7776611186c6d357f3ab026dae Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 2 Dec 2014 12:28:05 +0100 Subject: [PATCH] replaced serializer.object with serializer.validated_data --- rest_auth/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_auth/views.py b/rest_auth/views.py index 0f18fd5..05217cf 100644 --- a/rest_auth/views.py +++ b/rest_auth/views.py @@ -31,7 +31,7 @@ class Login(GenericAPIView): response_serializer = TokenSerializer 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( user=self.user) if getattr(settings, 'REST_SESSION_LOGIN', True):