-
Notifications
You must be signed in to change notification settings - Fork 696
Open
Labels
Description
Describe the issue
The DocumentInfo_get_href() helper caches its result, but it does not segregate the cache between different values of its meeting_doc_refs parameter. As a result, DocumentInfo.get_href() and DocumentInfo.get_versionless_href() return incorrect values if calls to them are interleaved.
E.g., using an arbitrary agenda:
>>> from ietf.doc.models import *
>>> ag = Document.objects.filter(type_id="agenda", group__acronym="asdf").last()
>>> ag.get_href()
'https://datatracker.ietf.org/meeting/interim-2026-asdf-02/materials/agenda-interim-2026-asdf-02-asdf-01-00'
>>> ag.get_versionless_href()
'https://datatracker.ietf.org/meeting/interim-2026-asdf-02/materials/agenda-interim-2026-asdf-02-asdf-01-00'
>>>Note that these are both the same and end with -01-00. Now restart the interpreter and...
>>> from ietf.doc.models import *
>>> ag = Document.objects.filter(type_id="agenda", group__acronym="asdf").last()
>>> ag.get_versionless_href()
'https://datatracker.ietf.org/meeting/interim-2026-asdf-02/materials/agenda-interim-2026-asdf-02-asdf-01'
>>> ag.get_href()
'https://datatracker.ietf.org/meeting/interim-2026-asdf-02/materials/agenda-interim-2026-asdf-02-asdf-01'
>>>again both the same, but without the final -00!
Code of Conduct
- I agree to follow the IETF's Code of Conduct