fix: Exclude replaced documents from IESG discusses (#7712)
* fix: Exclude replaced documents from IESG discusses * test: Add checks for filtering replaced IESG drafts * chore: Improve replaced draft filter --------- Co-authored-by: Paul Selkirk <paul@painless-security.com>
This commit is contained in:
parent
363c01e711
commit
a3e4e634fc
|
@ -52,6 +52,15 @@ class IESGTests(TestCase):
|
|||
self.assertContains(r, draft.name)
|
||||
self.assertContains(r, escape(pos.balloter.plain_name()))
|
||||
|
||||
# Mark draft as replaced
|
||||
draft.set_state(State.objects.get(type="draft", slug="repl"))
|
||||
|
||||
r = self.client.get(urlreverse("ietf.iesg.views.discusses"))
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
||||
self.assertNotContains(r, draft.name)
|
||||
self.assertNotContains(r, escape(pos.balloter.plain_name()))
|
||||
|
||||
def test_milestones_needing_review(self):
|
||||
draft = WgDraftFactory()
|
||||
RoleFactory(name_id='ad',group=draft.group,person=Person.objects.get(user__username='ad'))
|
||||
|
|
|
@ -483,6 +483,7 @@ def discusses(request):
|
|||
models.Q(states__type__in=("statchg", "conflrev"),
|
||||
states__slug__in=("iesgeval", "defer")),
|
||||
docevent__ballotpositiondocevent__pos__blocking=True)
|
||||
possible_docs = possible_docs.exclude(states__in=State.objects.filter(type="draft", slug="repl"))
|
||||
possible_docs = possible_docs.select_related("stream", "group", "ad").distinct()
|
||||
|
||||
docs = []
|
||||
|
|
Loading…
Reference in a new issue