fix: do not prematurely dereference status change RelatedDocuments#3835
Conversation
The urlize_related_source_list template tag expects the RelatedDocument instances, not the source Document.
Codecov Report
@@ Coverage Diff @@
## main #3835 +/- ##
==========================================
+ Coverage 87.95% 87.99% +0.03%
==========================================
Files 296 297 +1
Lines 38795 38769 -26
==========================================
- Hits 34124 34116 -8
+ Misses 4671 4653 -18
Continue to review full report at Codecov.
|
| <div>Proposed status changed by {{ proposed_status_changes|join:", "|urlize_related_source_list }}</div> | ||
| <div>Proposed status changed by {{ proposed_status_changes|urlize_related_source_list|join:", " }}</div> | ||
| {% endif %} | ||
| {% if rfc_aliases %}<div>Also known as {{ rfc_aliases|join:", "|urlize_ietf_docs }}</div>{% endif %} |
There was a problem hiding this comment.
Same bug on this line, though currently it won't be irritated as the length of rfc_aliases will be 0 or 1 until we handle bcps correctly
There was a problem hiding this comment.
eh - no - urlize_ietf_docs will work just fine on a string.
There was a problem hiding this comment.
Yeah, I chased that one for a bit - I think it's used a few places like this. It's a bit of a shame to convert a full-blown Document into its names just to parse those back into links that could have been generated directly from the Document, but it works. It'd be a nice thing to straighten out some time.
Fixes crash when displaying RFCs with status change documents.
Also adds tests to cover this and the change to the
person_linktag in #3832.