From fd9a0a4d9f786f5653bc2d0c4081e465419b7c3b Mon Sep 17 00:00:00 2001 From: Russ Housley Date: Tue, 22 Mar 2022 14:18:59 -0400 Subject: [PATCH] fix: Do not include concluded WGs in /list/nonwg. Fixes #3726. (#3727) --- ietf/mailinglists/tests.py | 9 +++++++++ ietf/mailinglists/views.py | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ietf/mailinglists/tests.py b/ietf/mailinglists/tests.py index 543904991..0c983da80 100644 --- a/ietf/mailinglists/tests.py +++ b/ietf/mailinglists/tests.py @@ -32,7 +32,13 @@ class MailingListTests(TestCase): def test_nonwg(self): + groups = list() + groups.append(GroupFactory(type_id='wg', acronym='mars', list_archive='https://ietf.org/mars')) + groups.append(GroupFactory(type_id='wg', acronym='ames', state_id='conclude', list_archive='https://ietf.org/ames')) + groups.append(GroupFactory(type_id='wg', acronym='newstuff', state_id='bof', list_archive='https://ietf.org/newstuff')) + groups.append(GroupFactory(type_id='rg', acronym='research', list_archive='https://irtf.org/research')) lists = ListFactory.create_batch(7) + url = urlreverse("ietf.mailinglists.views.nonwg") r = self.client.get(url) @@ -43,3 +49,6 @@ class MailingListTests(TestCase): else: self.assertNotContains(r, l.name, html=True) self.assertNotContains(r, l.description, html=True) + + for g in groups: + self.assertNotContains(r, g.acronym, html=True) diff --git a/ietf/mailinglists/views.py b/ietf/mailinglists/views.py index 9d3e12bad..51c31c546 100644 --- a/ietf/mailinglists/views.py +++ b/ietf/mailinglists/views.py @@ -1,4 +1,4 @@ -# Copyright The IETF Trust 2007, All Rights Reserved +# Copyright The IETF Trust 2007-2022, All Rights Reserved import re @@ -15,7 +15,7 @@ def groups(request): return render(request, "mailinglists/group_archives.html", { "groups": groups } ) def nonwg(request): - groups = Group.objects.filter(type__features__acts_like_wg=True).exclude(state__in=['bof', 'conclude']).order_by("acronym") + groups = Group.objects.filter(type__features__acts_like_wg=True).exclude(state__in=['bof']).order_by("acronym") #urls = [ g.list_archive for g in groups if '.ietf.org' in g.list_archive ]