Commit 6474092e authored by Jacob Kaplan-Moss's avatar Jacob Kaplan-Moss
Browse files

Fixed a bug introduced by [10316].

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10319 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent ee17cabb
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -422,7 +422,12 @@ class NullBooleanSelect(Select):

    def value_from_datadict(self, data, files, name):
        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):
        # Sometimes data or initial could be None or u'' which should be the