From: Matías Aguirre Date: Thu, 20 Jan 2011 02:34:50 +0000 (-0200) Subject: Default to empty string on AX support X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=8a6dd6fa3e8f6c7adce05eb2ecc425bc10ec1d83;p=django-social-auth.git Default to empty string on AX support --- diff --git a/social_auth/backends/__init__.py b/social_auth/backends/__init__.py index b513870..7549f7d 100644 --- a/social_auth/backends/__init__.py +++ b/social_auth/backends/__init__.py @@ -226,7 +226,7 @@ class OpenIDBackend(SocialAuthBackend): # Use Attribute Exchange attributes if provided resp = ax.FetchResponse.fromSuccessResponse(response) if resp: - values.update((alias.replace('old_', ''), resp.getSingle(src)) + values.update((alias.replace('old_', ''), resp.getSingle(src, '')) for src, alias in OLD_AX_ATTRS + AX_SCHEMA_ATTRS) fullname = values.get('fullname') or ''