summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-06-20 03:06:14 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-06-20 03:06:14 +0000
commit496d65154626e674d4a3a5aea167a44b764ab0d2 (patch)
treebc8b2ef71da7385ff7f5ce0c2ffbd2530c299c7c
parent15cbc67ea2e41deed5ad103f922438fe21401431 (diff)
downloaddjango-496d65154626e674d4a3a5aea167a44b764ab0d2.tar.gz
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
-rw-r--r--django/forms/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/__init__.py b/django/forms/__init__.py
index fab7a6da7a..1e9cb2c596 100644
--- a/django/forms/__init__.py
+++ b/django/forms/__init__.py
@@ -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):