Skip to content

Commit 733532e

Browse files
committed
Fix internal server error when generating bibtex for legacy RFCs. But at least
for RFC1786, the authors field is empty and the date wrong. Need to check whether this is an error in the database or in the code. But still: Commit ready for merge. - Legacy-Id: 10676
1 parent 7997b99 commit 733532e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/doc/views_doc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ def document_bibtex(request, name, rev=None):
675675
latest_revision = doc.latest_event(NewRevisionDocEvent, type="new_revision")
676676
replaced_by = [d.name for d in doc.related_that("replaces")]
677677
published = doc.latest_event(type="published_rfc")
678-
rfc = latest_revision.doc if latest_revision.doc.get_state_slug() == "rfc" else None
678+
rfc = latest_revision.doc if latest_revision and latest_revision.doc.get_state_slug() == "rfc" else None
679679

680680
if rev != None and rev != doc.rev:
681681
# find the entry in the history

ietf/templates/doc/document_bibtex.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@misc{% templatetag openbrace %}rfc{{ doc.rfc_number }},
77
series = {Request for Comments},
88
number= {{ doc.rfc_number }},
9-
howpublished= {% templatetag openbrace %}{{ doc.stream }} RFC {{ doc.rfc_number }} ({{ doc.intended_std_level }}){% templatetag closebrace %},
9+
howpublished= {% templatetag openbrace %}{{ doc.stream }} RFC {{ doc.rfc_number }}{% if doc.doc.intended_std_level %} ({{ doc.intended_std_level }}){% endif %}{% templatetag closebrace %},
1010
publisher = {RFC Editor},
1111
doi = {% templatetag openbrace %}10.17487/rfc{{ doc.rfc_number }}{% templatetag closebrace %},
1212
url = {https://rfc-editor.org/rfc/rfc{{ doc.rfc_number }}.txt},{% else %}

0 commit comments

Comments
 (0)