Skip to content

Commit 1756491

Browse files
committed
Add .distinct() to inactive ads to fix duplicate problem that was probably
introduced with pre-ADs - Legacy-Id: 3926
1 parent 5382b31 commit 1756491

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/idrfc/views_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,9 @@ def __init__(self, *args, **kwargs):
301301
active_ads = list(Person.objects.filter(role__name="ad",
302302
role__group__type="area",
303303
role__group__state="active").distinct())
304-
inactive_ads = list((Person.objects.filter(pk__in=responsible) | Person.objects.filter(role__name="pre-ad",
304+
inactive_ads = list(((Person.objects.filter(pk__in=responsible) | Person.objects.filter(role__name="pre-ad",
305305
role__group__type="area",
306-
role__group__state="active"))
306+
role__group__state="active")).distinct())
307307
.exclude(pk__in=[x.pk for x in active_ads]))
308308
extract_last_name = lambda x: x.name_parts()[3]
309309
active_ads.sort(key=extract_last_name)

0 commit comments

Comments
 (0)