]> git.parisson.com Git - django-social-auth.git/commitdiff
Update user only if needed
authorMatías Aguirre <matiasaguirre@gmail.com>
Mon, 24 Jan 2011 12:53:32 +0000 (10:53 -0200)
committerMatías Aguirre <matiasaguirre@gmail.com>
Mon, 24 Jan 2011 12:53:32 +0000 (10:53 -0200)
social_auth/backends/__init__.py

index 7549f7dba87d376e751e550804c59f2b41762de7..a0e1b90e6bfdffaee64de5bbd7075374be85bd94 100644 (file)
@@ -101,7 +101,7 @@ class SocialAuthBackend(ModelBackend):
         # Update extra_data storage, unless disabled by setting
         if getattr(settings, 'SOCIAL_AUTH_EXTRA_DATA', True):
             extra_data = self.extra_data(user, uid, response, details)
-            if extra_data:
+            if extra_data and social_user.extra_data != extra_data:
                 social_user.extra_data = extra_data
                 social_user.save()