diff options
| author | Tim Graham <timograham@gmail.com> | 2016-09-06 17:41:54 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-09-22 12:20:58 -0400 |
| commit | 3507d4e773aa9ff2336e7230ba231c4ba6eb568f (patch) | |
| tree | 09467b4724131e91b0afe1d2f133e5e56ba068cf /django/contrib/postgres/forms/array.py | |
| parent | 92323d54fd6df077dc523c423c7bb2dd8dbde621 (diff) | |
Fixed #27186 -- Fixed model form default fallback for MultiWidget, FileInput, SplitDateTimeWidget, SelectDateWidget, and SplitArrayWidget.
Thanks Matt Westcott for the review.
Diffstat (limited to 'django/contrib/postgres/forms/array.py')
| -rw-r--r-- | django/contrib/postgres/forms/array.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/django/contrib/postgres/forms/array.py b/django/contrib/postgres/forms/array.py index dd9ac1178e..bd3daaae0b 100644 --- a/django/contrib/postgres/forms/array.py +++ b/django/contrib/postgres/forms/array.py @@ -103,6 +103,12 @@ class SplitArrayWidget(forms.Widget): return [self.widget.value_from_datadict(data, files, '%s_%s' % (name, index)) for index in range(self.size)] + def value_omitted_from_data(self, data, files, name): + return all( + self.widget.value_omitted_from_data(data, files, '%s_%s' % (name, index)) + for index in range(self.size) + ) + def id_for_label(self, id_): # See the comment for RadioSelect.id_for_label() if id_: |
