]> git.parisson.com Git - django-social-auth.git/commitdiff
Avoid updating with empty values. Closes gh-111
authorMatías Aguirre <matiasaguirre@gmail.com>
Sun, 14 Aug 2011 09:29:58 +0000 (06:29 -0300)
committerMatías Aguirre <matiasaguirre@gmail.com>
Sun, 14 Aug 2011 09:29:58 +0000 (06:29 -0300)
social_auth/backends/__init__.py

index ea546fa9cf5880b2c3ca64bfdfcef34f3ba71a8b..47d17b31d351a58e007bd8d4830b6c79800e640f 100644 (file)
@@ -339,9 +339,9 @@ class OpenIDBackend(SocialAuthBackend):
         if ax_names:
             resp = ax.FetchResponse.fromSuccessResponse(response)
             if resp:
-                values.update((alias.replace('old_', ''),
-                               resp.getSingle(src, ''))
-                                for src, alias in ax_names)
+                for src, alias in ax_names:
+                    name = alias.replace('old_', '')
+                    values[name] = resp.getSingle(src, '') or values.get(name)
         return values
 
     def get_user_details(self, response):