From: Ulysses Date: Mon, 14 May 2012 19:29:26 +0000 (-0300) Subject: Prepopulates UserSocialAuth instance with an empty dictionary to allow the calling... X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d2a8495fc45173ad6e6efac4df3856465788964a;p=django-social-auth.git Prepopulates UserSocialAuth instance with an empty dictionary to allow the calling of extra_data.update() without raising a TypeError because the field was considered None when null. --- diff --git a/social_auth/models.py b/social_auth/models.py index f86cd09..e76aac1 100644 --- a/social_auth/models.py +++ b/social_auth/models.py @@ -27,7 +27,7 @@ class UserSocialAuth(models.Model): user = models.ForeignKey(User, related_name='social_auth') provider = models.CharField(max_length=32) uid = models.CharField(max_length=255) - extra_data = JSONField(blank=True) + extra_data = JSONField(default='{}') class Meta: """Meta data"""