Fixed an issue where the change of slide naming between IETF 96 and 97 caused the datatracker to not provide correct link to pre-IETF-97 materials. Thanks to tjw.ietf@gmail.com for the heads-up.
- Legacy-Id: 15017
This commit is contained in:
parent
6a32a363cc
commit
583d8882c5
3
PLAN
3
PLAN
|
@ -36,6 +36,9 @@ Planned work in rough order
|
|||
* Rework email sending so that all emails sent by the datatracker, except for
|
||||
logging and failure emails sent to ADMINS, are captured as a Message object.
|
||||
|
||||
* Rework email subjects for messages relating to documents to consistently
|
||||
start with the document name.
|
||||
|
||||
* Polish the htmlization pages, making the style identical with tools.ietf.org.
|
||||
|
||||
* Transition from the bower package manager to yarn. Some packages are
|
||||
|
|
|
@ -213,7 +213,6 @@ class DocumentInfo(models.Model):
|
|||
format = settings.DOC_HREFS[self.type_id]
|
||||
elif self.type_id in settings.MEETING_DOC_HREFS:
|
||||
self.is_meeting_related = True
|
||||
format = settings.MEETING_DOC_HREFS[self.type_id]
|
||||
else:
|
||||
if len(self.external_url):
|
||||
return self.external_url
|
||||
|
@ -229,6 +228,12 @@ class DocumentInfo(models.Model):
|
|||
if not sess:
|
||||
return ""
|
||||
meeting = sess.meeting
|
||||
# After IETF 96, meeting materials acquired revision
|
||||
# handling, and the document naming changed.
|
||||
if meeting.number.isdigit() and int(meeting.number) > 96:
|
||||
format = settings.MEETING_DOC_HREFS[self.type_id]
|
||||
else:
|
||||
format = settings.MEETING_DOC_OLD_HREFS[self.type_id]
|
||||
info = dict(doc=self, meeting=meeting)
|
||||
else:
|
||||
info = dict(doc=self)
|
||||
|
|
|
@ -607,6 +607,14 @@ MEETING_DOC_HREFS = {
|
|||
"bluesheets": "https://www.ietf.org/proceedings/{meeting.number}/bluesheets/{doc.external_url}",
|
||||
}
|
||||
|
||||
MEETING_DOC_OLD_HREFS = {
|
||||
"agenda": "/meeting/{meeting.number}/materials/{doc.name}",
|
||||
"minutes": "/meeting/{meeting.number}/materials/{doc.name}",
|
||||
"slides": "/meeting/{meeting.number}/materials/{doc.name}",
|
||||
"recording": "{doc.external_url}",
|
||||
"bluesheets": "https://www.ietf.org/proceedings/{meeting.number}/bluesheets/{doc.external_url}",
|
||||
}
|
||||
|
||||
# Override this in settings_local.py if needed
|
||||
CACHE_MIDDLEWARE_SECONDS = 300
|
||||
CACHE_MIDDLEWARE_KEY_PREFIX = ''
|
||||
|
|
Loading…
Reference in a new issue