Skip to content

Commit

Permalink
Merge ac01379 into 23f730a
Browse files Browse the repository at this point in the history
  • Loading branch information
dominickj-tdi committed Nov 21, 2019
2 parents 23f730a + ac01379 commit 8652b2a
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 8652b2a

Please sign in to comment.