Skip to content

Commit 7cc99b0

Browse files
committed
IETF 78 code from Peter Musgrave: Look for the WG name as the third element, for the WG-related drafts list; rather than accepting the WG name anywhere in a draft name.
- Legacy-Id: 2446
1 parent 4fd27d1 commit 7cc99b0

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

ietf/wginfo/views.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,12 @@ def wg_documents(request, acronym):
7676
(docs_related,meta_related) = search_query(form_related.cleaned_data)
7777
docs_related_pruned = []
7878
for d in docs_related:
79-
if d.id.draft_name_and_revision().count('-ietf-') == 0:
80-
docs_related_pruned.append(d)
81-
79+
parts = d.id.draft_name.split("-", 2);
80+
# canonical form draft-<name|ietf>-wg-etc
81+
if ( len(parts) >= 3):
82+
if parts[1] != "ietf" and parts[2].startswith(wg.group_acronym.acronym+"-"):
83+
docs_related_pruned.append(d)
84+
8285
return render_to_response('wginfo/wg_documents.html', {'wg': wg, 'concluded':concluded, 'selected':'documents', 'docs':docs, 'meta':meta,
8386
'docs_related':docs_related_pruned, 'meta_related':meta_related}, RequestContext(request))
8487

0 commit comments

Comments
 (0)