mirror of
https://github.com/django/django.git
synced 2025-10-27 23:56:08 +00:00
Fixed #19537 -- Made CheckboxInput._has_changed handle 'False' string
Thanks dibrovsd@gmail.com for the report.
This commit is contained in:
@@ -533,6 +533,9 @@ class CheckboxInput(Widget):
|
||||
def _has_changed(self, initial, data):
|
||||
# Sometimes data or initial could be None or '' which should be the
|
||||
# same thing as False.
|
||||
if initial == 'False':
|
||||
# show_hidden_initial may have transformed False to 'False'
|
||||
initial = False
|
||||
return bool(initial) != bool(data)
|
||||
|
||||
class Select(Widget):
|
||||
|
||||
Reference in New Issue
Block a user