1
0
mirror of https://github.com/django/django.git synced 2025-03-31 11:37:06 +00:00

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

View File

@ -687,7 +687,7 @@ class NullBooleanField(Field):
def to_python(self, 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 ('f', 'False', '0'): return False
raise exceptions.ValidationError(