Browse files

[py3] Fixed a loop that changed dictionary size.

  • Loading branch information...
1 parent 3963577 commit 12cda89ffe6a03031a321d61ff8b91f9978e4b2e @aaugustin aaugustin committed Aug 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/db/models/fields/
@@ -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'):

0 comments on commit 12cda89

Please sign in to comment.