Fixed a bug in `NullBooleanField.to_python`.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8684 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2008-08-28 21:23:21 +00:00
parent 8d8236385f
commit fc2978cc45
1 changed files with 1 additions and 1 deletions

View File

@ -687,7 +687,7 @@ class NullBooleanField(Field):
def to_python(self, value): def to_python(self, value):
if value in (None, True, False): return value if value in (None, True, False): return value
if value in ('None'): return None if value in ('None',): return None
if value in ('t', 'True', '1'): return True if value in ('t', 'True', '1'): return True
if value in ('f', 'False', '0'): return False if value in ('f', 'False', '0'): return False
raise exceptions.ValidationError( raise exceptions.ValidationError(