diff --git a/ietf/iesg/tests.py b/ietf/iesg/tests.py index 7211a6bc06..4579316f22 100644 --- a/ietf/iesg/tests.py +++ b/ietf/iesg/tests.py @@ -52,6 +52,15 @@ def test_feed(self): 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')) diff --git a/ietf/iesg/views.py b/ietf/iesg/views.py index a219a6b5de..b67ef04a03 100644 --- a/ietf/iesg/views.py +++ b/ietf/iesg/views.py @@ -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 = []