Skip to content

Commit 89e265d

Browse files
committed
Fixed an instance of changing a dictionary inside a loop over its keys.
- Legacy-Id: 16387
1 parent a1e7dc9 commit 89e265d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ietf/group/forms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ def __init__(self, *args, **kwargs):
116116
for r in role_fields_to_remove:
117117
del self.fields[r + "_roles"]
118118
if field:
119-
for f in self.fields:
119+
keys = list(self.fields.keys())
120+
for f in keys:
120121
if f != field:
121122
del self.fields[f]
122123

0 commit comments

Comments
 (0)