From 6ff356e891502f3da20f51299f45f4b95d72edd5 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 20 Mar 2017 09:28:21 -0400 Subject: [PATCH] Refs #27919 -- Passed ChoiceWidget.create_option() kwargs as expected. --- django/forms/widgets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/forms/widgets.py b/django/forms/widgets.py index e62f9c34dfa..7c7e3b01b61 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