1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

boulder-oracle-sprint: Changed NullBooleanField.allows_empty_string from

inherited value of True to False. This allows Django to correctly choose 
a default value of None rather than "" when the Oracle backend is used, 
as well as being generally sensible.


git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@5428 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Boulder Sprinters 2007-06-06 20:48:52 +00:00
parent 0248dfd375
commit 5e8eef19dc

View File

@ -811,6 +811,7 @@ class IPAddressField(Field):
validators.isValidIPAddress4(field_data, None) validators.isValidIPAddress4(field_data, None)
class NullBooleanField(Field): class NullBooleanField(Field):
empty_strings_allowed = False
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
kwargs['null'] = True kwargs['null'] = True
Field.__init__(self, *args, **kwargs) Field.__init__(self, *args, **kwargs)