From: Stas Kravets Date: Mon, 11 Jul 2011 08:49:41 +0000 (+0400) Subject: Added safe conversion of UID in init in order to avoid possible congestions. X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=97b4fd3b64c1aa3f5474089855c643b96ee8ad73;p=django-social-auth.git Added safe conversion of UID in init in order to avoid possible congestions. --- diff --git a/social_auth/backends/__init__.py b/social_auth/backends/__init__.py index ef4f52b..b1db668 100644 --- a/social_auth/backends/__init__.py +++ b/social_auth/backends/__init__.py @@ -243,10 +243,10 @@ class SocialAuthBackend(ModelBackend): """Return social auth user instance for given uid for current backend. - Riase DoesNotExist exception if no entry. + Raise DoesNotExist exception if no entry. """ return UserSocialAuth.objects.select_related('user')\ - .get(provider=self.name, uid=uid) + .get(provider=self.name, uid=str(uid)) def get_user_id(self, details, response): """Must return a unique ID from values returned on details"""