Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ietf/community/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_rule_matching(self):
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)
Expand Down
2 changes: 1 addition & 1 deletion ietf/group/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion ietf/group/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
2 changes: 1 addition & 1 deletion ietf/person/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def has_drafts(self):

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

Expand Down
6 changes: 3 additions & 3 deletions ietf/stats/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def build_document_stats_url(stats_type_override=Ellipsis, get_overrides=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":
Expand Down Expand Up @@ -370,7 +370,7 @@ def build_document_stats_url(stats_type_override=Ellipsis, get_overrides=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":
Expand Down Expand Up @@ -599,7 +599,7 @@ def build_document_stats_url(stats_type_override=Ellipsis, get_overrides=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":
Expand Down