fix: Don't show replaced, expired or otherwise abandoned docs for AD (#5162)
* fix: Don't show replaced, expired or otherwise abandoned docs for AD Fixes #5153 and #2889. * Fix filter conditions * Update ietf/doc/views_search.py Co-authored-by: Robert Sparks <rjsparks@nostrum.com> --------- Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
This commit is contained in:
parent
27037d43b3
commit
90b6cf4ba5
|
@ -679,7 +679,27 @@ def docs_for_ad(request, name):
|
|||
results, meta = prepare_document_table(request, retrieve_search_results(form), form.data, max_results=500)
|
||||
results.sort(key=ad_dashboard_sort_key)
|
||||
del meta["headers"][-1]
|
||||
#
|
||||
|
||||
# filter out some results
|
||||
results = [
|
||||
r
|
||||
for r in results
|
||||
if not (
|
||||
r.type_id == "charter"
|
||||
and (
|
||||
r.group.state_id == "abandon"
|
||||
or r.get_state_slug("charter") == "replaced"
|
||||
)
|
||||
)
|
||||
and not (
|
||||
r.type_id == "draft"
|
||||
and (
|
||||
r.get_state_slug("draft-iesg") == "dead"
|
||||
or r.get_state_slug("draft") == "repl"
|
||||
)
|
||||
)
|
||||
]
|
||||
|
||||
for d in results:
|
||||
d.search_heading = ad_dashboard_group(d)
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue