summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/forms/widgets.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 1b1c1439cb..67e44829ff 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -620,8 +620,6 @@ class ChoiceWidget(Widget):
def create_option(self, name, value, label, selected, index, subindex=None, attrs=None):
index = str(index) if subindex is None else "%s_%s" % (index, subindex)
- if attrs is None:
- attrs = {}
option_attrs = self.build_attrs(self.attrs, attrs) if self.option_inherits_attrs else {}
if selected:
option_attrs.update(self.checked_attribute)