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:
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…
x
Reference in New Issue
Block a user