1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Refs #27186 -- Fixed model form default fallback for CheckboxSelectMultiple.

This commit is contained in:
Tim Graham
2016-09-30 14:49:50 -04:00
committed by GitHub
parent 1d25eb9688
commit 87c5e7efeb
6 changed files with 38 additions and 10 deletions

View File

@@ -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):
"""