Default to null=True for Django Fields.
Fixes issue #161.
Reviewed in http://codereview.appspot.com/6448098/
diff --git a/oauth2client/django_orm.py b/oauth2client/django_orm.py
index f9ce26d..d54d20c 100644
--- a/oauth2client/django_orm.py
+++ b/oauth2client/django_orm.py
@@ -31,6 +31,11 @@
__metaclass__ = models.SubfieldBase
+ def __init__(self, *args, **kwargs):
+ if 'null' not in kwargs:
+ kwargs['null'] = True
+ super(CredentialsField, self).__init__(*args, **kwargs)
+
def get_internal_type(self):
return "TextField"
@@ -51,6 +56,11 @@
__metaclass__ = models.SubfieldBase
+ def __init__(self, *args, **kwargs):
+ if 'null' not in kwargs:
+ kwargs['null'] = True
+ super(FlowField, self).__init__(*args, **kwargs)
+
def get_internal_type(self):
return "TextField"