diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 4fae110d5e..3a22fb6119 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -808,6 +808,8 @@ class NullBooleanSelect(Select): return { True: "true", False: "false", + "True": "true", + "False": "false", "true": "true", "false": "false", # For backwards compatibility with Django < 2.2. @@ -821,9 +823,9 @@ class NullBooleanSelect(Select): value = data.get(name) return { True: True, + False: False, "True": True, "False": False, - False: False, "true": True, "false": False, # For backwards compatibility with Django < 2.2.