fix: Do not include concluded WGs in /list/nonwg. Fixes #3726. (#3727)

This commit is contained in:
Russ Housley 2022-03-22 14:18:59 -04:00 committed by GitHub
parent 3d529bad20
commit fd9a0a4d9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -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)

View file

@ -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 ]