Skip to content

Commit 4fd9247

Browse files
committed
Tweaks to group_features_group_filter()
- Legacy-Id: 16015
1 parent e52d1e6 commit 4fd9247

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ietf/group/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,12 @@ def construct_group_menu_context(request, group, selected, group_type, others):
256256
def group_features_group_filter(groups, person, feature):
257257
"""This returns a list of groups filtered such that the given person has
258258
a role listed in the given feature for each group."""
259-
feature_groups = []
259+
feature_groups = set([])
260260
for g in groups:
261261
for r in person.role_set.filter(group=g):
262262
if r.name.slug in getattr(r.group.type.features, feature):
263-
feature_groups.append(g)
264-
return feature_groups
263+
feature_groups.add(g)
264+
return list(feature_groups)
265265

266266
def group_features_role_filter(roles, person, feature):
267267
type_slugs = set(roles.values_list('group__type__slug', flat=True))

0 commit comments

Comments
 (0)