Rename variable for clarity

We have two variables named `token` which have different data types
This commit is contained in:
Maxim Kukhtenkov 2016-12-02 16:35:13 -08:00
parent f09bbaf877
commit 6812deeeb4

View File

@ -99,11 +99,11 @@ class SocialLoginSerializer(serializers.Serializer):
else:
raise serializers.ValidationError(_('Incorrect input. access_token or code is required.'))
token = adapter.parse_token({'access_token': access_token})
token.app = app
social_token = adapter.parse_token({'access_token': access_token})
social_token.app = app
try:
login = self.get_social_login(adapter, app, token, access_token)
login = self.get_social_login(adapter, app, social_token, access_token)
complete_social_login(request, login)
except HTTPError:
raise serializers.ValidationError(_('Incorrect value'))