From: Stas Kravets Date: Mon, 17 Jan 2011 14:01:22 +0000 (+0300) Subject: Reverted signal processing in user details update; removed django dependency from... X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=9c39ba20c44394d8d94f97ca899f09d3e492b4a3;p=django-social-auth.git Reverted signal processing in user details update; removed django dependency from setup - was not good for development version of django. --- diff --git a/setup.py b/setup.py index bd558ed..321d759 100644 --- a/setup.py +++ b/setup.py @@ -34,8 +34,7 @@ setup(name='django-social-auth', url='https://github.com/omab/django-social-auth', packages=['social_auth'], long_description=long_description(), - install_requires=['django>=1.2', - 'oauth>=1.0', + install_requires=['oauth>=1.0', 'python_openid>=2.2'], classifiers=['Framework :: Django', 'Development Status :: 4 - Beta', diff --git a/social_auth/backends.py b/social_auth/backends.py index 3c627dc..bcd5450 100644 --- a/social_auth/backends.py +++ b/social_auth/backends.py @@ -128,7 +128,15 @@ class SocialAuthBackend(ModelBackend): user=user, response=response, details=details)) - if changed or updated: + + # Looking for at least one update + has_update = False + for result in updated: + if result[1]: + has_update = True + break + + if changed or has_update: user.save() def get_user_id(self, details, response):