From 97b4fd3b64c1aa3f5474089855c643b96ee8ad73 Mon Sep 17 00:00:00 2001 From: Stas Kravets Date: Mon, 11 Jul 2011 12:49:41 +0400 Subject: [PATCH] Added safe conversion of UID in init in order to avoid possible congestions. --- social_auth/backends/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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""" -- 2.39.5