Skip to content

Commit

Permalink
[py3] Fixed a loop that changed dictionary size.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaugustin committed Aug 8, 2012
1 parent 3963577 commit 12cda89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/db/models/fields/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def formfield(self, form_class=forms.CharField, **kwargs):
# Many of the subclass-specific formfield arguments (min_value,
# max_value) don't apply for choice fields, so be sure to only pass
# the values that TypedChoiceField will understand.
for k in kwargs.keys():
for k in list(six.iterkeys(kwargs)):
if k not in ('coerce', 'empty_value', 'choices', 'required',
'widget', 'label', 'initial', 'help_text',
'error_messages', 'show_hidden_initial'):
Expand Down

0 comments on commit 12cda89

Please sign in to comment.