misc: dont mutate dictionnary during iteration (#44869)
This commit is contained in:
parent
901f9af326
commit
d78ce337ec
|
@ -437,7 +437,7 @@ class AppConfig(django.apps.AppConfig):
|
|||
form.initial['preferred_givenname'] = view.token.get('first_name', '')
|
||||
form.fields['preferred_givenname'].widget = HiddenInput()
|
||||
|
||||
for name in form.fields:
|
||||
for name in list(form.fields):
|
||||
if 'password' not in name and name not in ('preferred_username', 'preferred_givenname'):
|
||||
form.fields.pop(name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue