diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-08-07 15:49:33 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-08-08 15:00:24 +0200 |
| commit | 12cda89ffe6a03031a321d61ff8b91f9978e4b2e (patch) | |
| tree | d6e69149208b64e5072f0f9630ac1097a873fc23 | |
| parent | 396357741b88dfcd85486db673dbb822da8b2de0 (diff) | |
[py3] Fixed a loop that changed dictionary size.
| -rw-r--r-- | django/db/models/fields/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 2c38e8d72e..3737a504bb 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -489,7 +489,7 @@ class Field(object): # 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'): |
