From e42ac40ec4902f4ff4b859b3d1d06c746c4a9991 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Tue, 11 Jul 2023 16:16:05 -0300 Subject: [PATCH] fix: Use (rfc, published) state for RFC SearchRules --- ietf/community/forms.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ietf/community/forms.py b/ietf/community/forms.py index 8d72ce0d7..fec53a178 100644 --- a/ietf/community/forms.py +++ b/ietf/community/forms.py @@ -42,7 +42,10 @@ class SearchRuleForm(forms.ModelForm): if rule_type == "group_exp": restrict_state("draft", "expired") else: - restrict_state("draft", "rfc" if rule_type.endswith("rfc") else "active") + if rule_type.endswith("rfc"): + restrict_state("rfc", "published") + else: + restrict_state("draft", "active") if rule_type.startswith("area"): self.fields["group"].label = "Area" @@ -70,7 +73,10 @@ class SearchRuleForm(forms.ModelForm): del self.fields["text"] elif rule_type in ["author", "author_rfc", "shepherd", "ad"]: - restrict_state("draft", "rfc" if rule_type.endswith("rfc") else "active") + if rule_type.endswith("rfc"): + restrict_state("rfc", "published") + else: + restrict_state("draft", "active") if rule_type.startswith("author"): self.fields["person"].label = "Author" @@ -84,7 +90,10 @@ class SearchRuleForm(forms.ModelForm): del self.fields["text"] elif rule_type == "name_contains": - restrict_state("draft", "rfc" if rule_type.endswith("rfc") else "active") + if rule_type.endswith("rfc"): + restrict_state("rfc", "published") + else: + restrict_state("draft", "active") del self.fields["person"] del self.fields["group"]