From 9c39ba20c44394d8d94f97ca899f09d3e492b4a3 Mon Sep 17 00:00:00 2001 From: Stas Kravets Date: Mon, 17 Jan 2011 17:01:22 +0300 Subject: [PATCH] Reverted signal processing in user details update; removed django dependency from setup - was not good for development version of django. --- setup.py | 3 +-- social_auth/backends.py | 10 +++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) 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): -- 2.39.5