From 89e265d7988af18d2426b498bd7a650c729a3e0f Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 4 Jul 2019 16:12:09 +0000 Subject: [PATCH] Fixed an instance of changing a dictionary inside a loop over its keys. - Legacy-Id: 16387 --- ietf/group/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ietf/group/forms.py b/ietf/group/forms.py index 04cfc9f3f..c84c6a318 100644 --- a/ietf/group/forms.py +++ b/ietf/group/forms.py @@ -116,7 +116,8 @@ class GroupForm(forms.Form): for r in role_fields_to_remove: del self.fields[r + "_roles"] if field: - for f in self.fields: + keys = list(self.fields.keys()) + for f in keys: if f != field: del self.fields[f]