Skip to content

Commit

Permalink
Fixed #2190 -- Now allowing NullBooleanField to be given None
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3161 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Jun 20, 2006
1 parent 15cbc67 commit 496d651
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/forms/__init__.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ def render(self, data):
return SelectField.render(self, data) return SelectField.render(self, data)


def html2python(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) html2python = staticmethod(html2python)


class SelectMultipleField(SelectField): class SelectMultipleField(SelectField):
Expand Down

0 comments on commit 496d651

Please sign in to comment.