Skip to content

Commit

Permalink
Merge f48b57f into cb02076
Browse files Browse the repository at this point in the history
  • Loading branch information
dominickj-tdi committed Dec 17, 2019
2 parents cb02076 + f48b57f commit 7c0ae54
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/wtforms/fields/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,12 @@ def __init__(
self.validate_choice = validate_choice

def iter_choices(self):
for value, label in self.choices:
if isinstance(self.choices[0], (list, tuple)):
choices = self.choices
else:
choices = zip(self.choices, self.choices)

for value, label in choices:
yield (value, label, self.coerce(value) == self.data)

def process_data(self, value):
Expand Down

0 comments on commit 7c0ae54

Please sign in to comment.