From: Matías Aguirre Date: Mon, 24 Jan 2011 12:53:32 +0000 (-0200) Subject: Update user only if needed X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=fbcfa862e3d5a0b0451d5bb391295eaa8a710790;p=django-social-auth.git Update user only if needed --- diff --git a/social_auth/backends/__init__.py b/social_auth/backends/__init__.py index 7549f7d..a0e1b90 100644 --- a/social_auth/backends/__init__.py +++ b/social_auth/backends/__init__.py @@ -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()