Fix a bug in the logic that determines which roles are editable (the

bug had the reviewer field showing up on non-dir pages)
 - Legacy-Id: 12186
This commit is contained in:
Ole Laursen 2016-10-20 15:30:35 +00:00
parent 4b987436c0
commit 1febf2465d

View file

@ -81,8 +81,8 @@ class GroupForm(forms.Form):
self.fields['parent'].queryset = self.fields['parent'].queryset.filter(type="area")
self.fields['parent'].label = "IETF Area"
role_fields_to_remove = (set(roles_for_group_type(self.group_type))
- set(strip_suffix(attr, "_roles") for attr in self.fields if attr.endswith("_roles")))
role_fields_to_remove = (set(strip_suffix(attr, "_roles") for attr in self.fields if attr.endswith("_roles"))
- set(roles_for_group_type(self.group_type)))
for r in role_fields_to_remove:
del self.fields[r + "_roles"]