From e0b25bfd2c97f82ccaeb0cf4fb41f33a995d7fa1 Mon Sep 17 00:00:00 2001 From: Andres Villavicencio Date: Mon, 9 Jan 2012 05:22:02 +0000 Subject: [PATCH] Using dict.get to avoid KeyError --- social_auth/backends/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/social_auth/backends/__init__.py b/social_auth/backends/__init__.py index d87aa06..df8d7ee 100644 --- a/social_auth/backends/__init__.py +++ b/social_auth/backends/__init__.py @@ -114,7 +114,7 @@ class SocialAuthBackend(ModelBackend): # account user = social_user.user user.social_user = social_user - user.is_new = out['is_new'] + user.is_new = out.get('is_new') return user def pipeline(self, pipeline, request, *args, **kwargs): -- 2.39.5