[Python-modules-commits] [python-social-auth] 05/131: fixing new_association returned by social.pipeline.social_auth.social_user

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:16:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to tag v0.2.20
in repository python-social-auth.

commit e73089dc5965ba2e5995744f5cd35f7ce5b04232
Author: falcon1kr <falcon1kr at hotmail.com>
Date:   Tue Dec 8 17:23:24 2015 -0800

    fixing new_association returned by social.pipeline.social_auth.social_user
---
 social/pipeline/social_auth.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/social/pipeline/social_auth.py b/social/pipeline/social_auth.py
index 87895ec..697bf1a 100644
--- a/social/pipeline/social_auth.py
+++ b/social/pipeline/social_auth.py
@@ -17,6 +17,7 @@ def auth_allowed(backend, details, response, *args, **kwargs):
 
 def social_user(backend, uid, user=None, *args, **kwargs):
     provider = backend.name
+    new_association = True
     social = backend.strategy.storage.user.get_social_auth(provider, uid)
     if social:
         if user and social.user != user:
@@ -24,10 +25,11 @@ def social_user(backend, uid, user=None, *args, **kwargs):
             raise AuthAlreadyAssociated(backend, msg)
         elif not user:
             user = social.user
+        new_association = False
     return {'social': social,
             'user': user,
             'is_new': user is None,
-            'new_association': False}
+            'new_association': new_association}
 
 
 def associate_user(backend, uid, user=None, social=None, *args, **kwargs):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-social-auth.git



More information about the Python-modules-commits mailing list