From f0d9ede9e653c03052c5c7fdeae5b88feda267df Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Thu, 31 Aug 2017 17:04:36 +0500 Subject: [PATCH] Removed useless itertools.chain() call in ChoiceWidget.optgroups(). --- django/forms/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 35904d3372..dbb3b2e851 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -583,7 +583,7 @@ class ChoiceWidget(Widget): groups = [] has_selected = False - for index, (option_value, option_label) in enumerate(chain(self.choices)): + for index, (option_value, option_label) in enumerate(self.choices): if option_value is None: option_value = ''