summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-09-30 14:49:50 -0400
committerGitHub <noreply@github.com>2016-09-30 14:49:50 -0400
commit87c5e7efebd040aef0f0479ccf86877155bb5cea (patch)
tree7306b48f0da0844ca0f0f2e4347d9453eb11012e /django/forms
parent1d25eb9688f1a245737490dccf8ba54b6c907052 (diff)
Refs #27186 -- Fixed model form default fallback for CheckboxSelectMultiple.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/widgets.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index f9cfaee9f9..427ea469e2 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -817,6 +817,11 @@ class CheckboxSelectMultiple(RendererMixin, SelectMultiple):
# require all checkboxes to be checked instead of at least one.
return False
+ def value_omitted_from_data(self, data, files, name):
+ # HTML checkboxes don't appear in POST data if not checked, so it's
+ # never known if the value is actually omitted.
+ return False
+
class MultiWidget(Widget):
"""