Fixed #2190 -- Now allowing NullBooleanField to be given None
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3161 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
15cbc67ea2
commit
496d651546
|
@ -571,7 +571,7 @@ class NullBooleanField(SelectField):
|
|||
return SelectField.render(self, data)
|
||||
|
||||
def html2python(data):
|
||||
return {'1': None, '2': True, '3': False}[data]
|
||||
return {None: None, '1': None, '2': True, '3': False}[data]
|
||||
html2python = staticmethod(html2python)
|
||||
|
||||
class SelectMultipleField(SelectField):
|
||||
|
|
Loading…
Reference in New Issue