Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[py3] Fixed a loop that changed dictionary size.

  • Loading branch information...
commit 12cda89ffe6a03031a321d61ff8b91f9978e4b2e 1 parent 3963577
@aaugustin aaugustin authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/models/fields/__init__.py
View
2  django/db/models/fields/__init__.py
@@ -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'):
Please sign in to comment.
Something went wrong with that request. Please try again.