From: Matías Aguirre Date: Mon, 17 Jan 2011 17:52:06 +0000 (-0200) Subject: Fix signal handlers update result checking X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=181b6e4a125584666bbbffd530c4332817c8005b;p=django-social-auth.git Fix signal handlers update result checking --- diff --git a/social_auth/backends.py b/social_auth/backends.py index 25c9008..4f823fa 100644 --- a/social_auth/backends.py +++ b/social_auth/backends.py @@ -123,11 +123,11 @@ class SocialAuthBackend(ModelBackend): # Fire a pre-update signal sending current backend instance, # user instance (created or retrieved from database), service # response and processed details, signal handlers must return - # True or False to signal that something has changed - updated = filter(None, pre_update.send(sender=self.__class__, - user=user, - response=response, - details=details)) + # True or False to signal that something has changed. Send method + # returns a list of tuples with receiver and it's response + updated = filter(lambda (receiver, response): response, + pre_update.send(sender=self.__class__, user=user, + response=response, details=details)) if changed or updated: user.save()