diff options
| author | Tim Graham <timograham@gmail.com> | 2017-03-20 09:28:21 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-03-21 09:14:45 -0400 |
| commit | 6ff356e891502f3da20f51299f45f4b95d72edd5 (patch) | |
| tree | 5b9e35eb19f3631a4806aa0dfba2f5481ed39ab0 | |
| parent | 08972528c264c2d6c0a7680874cf4a10c681dfa3 (diff) | |
Refs #27919 -- Passed ChoiceWidget.create_option() kwargs as expected.
| -rw-r--r-- | django/forms/widgets.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py index e62f9c34df..7c7e3b01b6 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -576,8 +576,8 @@ class ChoiceWidget(Widget): if selected is True and has_selected is False: has_selected = True subgroup.append(self.create_option( - name, subvalue, sublabel, selected, index, subindex, - attrs=attrs, + name, subvalue, sublabel, selected, index, + subindex=subindex, attrs=attrs, )) if subindex is not None: subindex += 1 |
