From 496d65154626e674d4a3a5aea167a44b764ab0d2 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 20 Jun 2006 03:06:14 +0000 Subject: [PATCH] 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 --- django/forms/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):