From 3f590f681f8b870a51568afff5f48f522bb2d369 Mon Sep 17 00:00:00 2001 From: Roderic Morris Date: Thu, 28 Apr 2011 23:18:00 -0400 Subject: [PATCH] Include social_user in exception raised when an account is already registered. Give exception handling code more information to mitigate the conflict. --- social_auth/backends/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/social_auth/backends/__init__.py b/social_auth/backends/__init__.py index a179c65..76d3dc7 100644 --- a/social_auth/backends/__init__.py +++ b/social_auth/backends/__init__.py @@ -138,7 +138,7 @@ class SocialAuthBackend(ModelBackend): # would imply update user references on other apps, that's too # much intrusive if 'user' in kwargs and kwargs['user'] != social_user.user: - raise ValueError('Account already in use.') + raise ValueError('Account already in use.', social_user) user = social_user.user # Update user account data. -- 2.39.5