From d2a8495fc45173ad6e6efac4df3856465788964a Mon Sep 17 00:00:00 2001 From: Ulysses Date: Mon, 14 May 2012 16:29:26 -0300 Subject: [PATCH] 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. --- social_auth/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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""" -- 2.39.5