Fixed a bug introduced by [10316].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10319 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ee17cabba0
commit
6474092e9a
|
@ -422,7 +422,12 @@ class NullBooleanSelect(Select):
|
||||||
|
|
||||||
def value_from_datadict(self, data, files, name):
|
def value_from_datadict(self, data, files, name):
|
||||||
value = data.get(name, None)
|
value = data.get(name, None)
|
||||||
return {u'2': True, u'3': False, 'True': True, 'False': False}.get(value, None)
|
return {u'2': True,
|
||||||
|
True: True,
|
||||||
|
'True': True,
|
||||||
|
u'3': False,
|
||||||
|
'False': False,
|
||||||
|
False: False}.get(value, None)
|
||||||
|
|
||||||
def _has_changed(self, initial, data):
|
def _has_changed(self, initial, data):
|
||||||
# Sometimes data or initial could be None or u'' which should be the
|
# Sometimes data or initial could be None or u'' which should be the
|
||||||
|
|
Loading…
Reference in New Issue