diff --git a/ietf/community/tests.py b/ietf/community/tests.py index 19530efcd..ee5827ee2 100644 --- a/ietf/community/tests.py +++ b/ietf/community/tests.py @@ -41,7 +41,7 @@ class CommunityListTests(WebTest): clist = CommunityList.objects.create(user=User.objects.get(username="plain")) rule_group = SearchRule.objects.create(rule_type="group", group=draft.group, state=State.objects.get(type="draft", slug="active"), community_list=clist) - rule_group_rfc = SearchRule.objects.create(rule_type="group_rfc", group=draft.group, state=State.objects.get(type="draft", slug="rfc"), community_list=clist) + rule_group_rfc = SearchRule.objects.create(rule_type="group_rfc", group=draft.group, state=State.objects.get(type="rfc", slug="published"), community_list=clist) rule_area = SearchRule.objects.create(rule_type="area", group=draft.group.parent, state=State.objects.get(type="draft", slug="active"), community_list=clist) rule_state_iesg = SearchRule.objects.create(rule_type="state_iesg", state=State.objects.get(type="draft-iesg", slug="lc"), community_list=clist) diff --git a/ietf/group/utils.py b/ietf/group/utils.py index ed6552998..92b9ac1bd 100644 --- a/ietf/group/utils.py +++ b/ietf/group/utils.py @@ -189,7 +189,7 @@ def setup_default_community_list_for_group(group): community_list=clist, rule_type="group_rfc", group=group, - state=State.objects.get(slug="rfc", type="draft"), + state=State.objects.get(slug="published", type="rfc"), ) SearchRule.objects.create( community_list=clist, diff --git a/ietf/group/views.py b/ietf/group/views.py index 10606b603..0ae5f6775 100644 --- a/ietf/group/views.py +++ b/ietf/group/views.py @@ -740,7 +740,7 @@ def dependencies(request, acronym, group_type=None): relationship__slug__startswith="ref", ) - both_rfcs = Q(source__states__slug="rfc", target__states__slug="rfc") + both_rfcs = Q(source__type_id="rfc", target__type_id="rfc") inactive = Q(source__states__slug__in=["expired", "repl"]) attractor = Q(target__name__in=["rfc5000", "rfc5741"]) removed = Q(source__states__slug__in=["auth-rm", "ietf-rm"]) diff --git a/ietf/person/models.py b/ietf/person/models.py index 87a33704b..0bb2b149e 100644 --- a/ietf/person/models.py +++ b/ietf/person/models.py @@ -190,7 +190,7 @@ class Person(models.Model): def rfcs(self): from ietf.doc.models import Document - rfcs = list(Document.objects.filter(documentauthor__person=self, type='draft', states__slug='rfc')) + rfcs = list(Document.objects.filter(documentauthor__person=self, type='rfc')) rfcs.sort(key=lambda d: d.name ) return rfcs diff --git a/ietf/stats/views.py b/ietf/stats/views.py index 666ef762e..e2b7706a2 100644 --- a/ietf/stats/views.py +++ b/ietf/stats/views.py @@ -216,7 +216,7 @@ def document_stats(request, stats_type=None): # filter documents document_filters = Q(type__in=["draft","rfc"]) # TODO - review lots of "rfc is a draft" assumptions below - rfc_state = State.objects.get(type="draft", slug="rfc") + rfc_state = State.objects.get(type="rfc", slug="published") if document_type == "rfc": document_filters &= Q(states=rfc_state) elif document_type == "draft": @@ -370,7 +370,7 @@ def document_stats(request, stats_type=None): person_filters = Q(documentauthor__document__type="draft") # filter persons - rfc_state = State.objects.get(type="draft", slug="rfc") + rfc_state = State.objects.get(type="rfc", slug="published") if document_type == "rfc": person_filters &= Q(documentauthor__document__states=rfc_state) elif document_type == "draft": @@ -599,7 +599,7 @@ def document_stats(request, stats_type=None): person_filters = Q(documentauthor__document__type="draft") # filter persons - rfc_state = State.objects.get(type="draft", slug="rfc") + rfc_state = State.objects.get(type="rfc", slug="published") if document_type == "rfc": person_filters &= Q(documentauthor__document__states=rfc_state) elif document_type == "draft":