summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-03-20 09:28:21 -0400
committerTim Graham <timograham@gmail.com>2017-03-21 09:54:37 -0400
commit524f1e7051a36a633abef756d3284886f22c2340 (patch)
treeaf009db4735a89167a81af7aa60a575a1fae9bb9 /django/forms
parent4f02adbf5390187cf3a86037657a3caf53183630 (diff)
[1.11.x] Refs #27919 -- Passed ChoiceWidget.create_option() kwargs as expected.
Backport of 6ff356e891502f3da20f51299f45f4b95d72edd5 from master
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/widgets.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index b5b3b2ae95..90ff7bff55 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -595,8 +595,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