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:
parent
8d8236385f
commit
fc2978cc45
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue