summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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