Skip to content
This repository
Browse code

Merge pull request #633 from serdardalgic/return_value_fix_for_pipeli…

…ne_social_associate_user_function

Return value fix for pipeline social associate user function
  • Loading branch information...
commit 5da548e7e146b55d9bd3fab2c46c064575e9c25e 2 parents 50eb0f5 + c901623
Matías Aguirre authored

Showing 1 changed file with 1 addition and 4 deletions. Show diff stats Hide diff stats

  1. 5  social_auth/backends/pipeline/social.py
5  social_auth/backends/pipeline/social.py
@@ -27,12 +27,9 @@ def social_auth_user(backend, uid, user=None, *args, **kwargs):
27 27
 
28 28
 def associate_user(backend, user, uid, social_user=None, *args, **kwargs):
29 29
     """Associate user social account with user instance."""
30  
-    if social_user:
  30
+    if social_user or not user:
31 31
         return None
32 32
 
33  
-    if not user:
34  
-        return {}
35  
-
36 33
     try:
37 34
         social = UserSocialAuth.create_social_auth(user, uid, backend.name)
38 35
     except Exception, e:

0 notes on commit 5da548e

Please sign in to comment.
Something went wrong with that request. Please try again.