Skip to content

Commit 18f9f2a

Browse files
committed
Fix timeline corner cases for non-ID documents
- Legacy-Id: 9926
1 parent 21d642f commit 18f9f2a

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

ietf/doc/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,11 @@ def ancestors(doc):
610610
for d in history:
611611
for e in d.docevent_set.filter(type='new_revision'):
612612
retval.append((d.name, e.newrevisiondocevent.rev, e.time.isoformat()))
613-
e = doc.latest_event(type='published_rfc')
613+
614+
if doc.type_id == "draft":
615+
e = doc.latest_event(type='published_rfc')
616+
else:
617+
e = doc.latest_event(type='iesg_approved')
614618
if e:
615619
retval.append((doc.name, e.doc.canonical_name, e.time.isoformat()))
616620
return sorted(retval, key=operator.itemgetter(2))

ietf/templates/doc/timeline.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
for (i = 0; i < data.length-1; i++) {
2424
d.addRow([ data[0][0], data[i][0] + "-" + data[i][1], data[i][2], data[i+1][2] ]);
2525
}
26-
if (!data[i][1].match(/rfc/)) {
26+
if (!isNaN(parseInt(data[i][1]))) {
2727
d.addRow([ data[0][0], data[i][0] + "-" + data[i][1], data[i][2], new Date() ]);
2828
}
2929

0 commit comments

Comments
 (0)