-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: do not prematurely dereference status change RelatedDocuments #3835
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.
|
{% endif %} | ||
{% if proposed_status_changes %} | ||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eh - no - urlize_ietf_docs will work just fine on a string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_link
tag in #3832.