Merged in [13183] from rcross@amsl.com:

Fix error when selecting a document on the Telechat agenda that does not have a writeup.  Fixes #2262.
 - Legacy-Id: 13191
Note: SVN reference [13183] has been migrated to Git commit 8a725c6e1e
This commit is contained in:
Henrik Levkowetz 2017-04-11 00:21:29 +00:00
commit 4ef318b039

View file

@ -58,11 +58,12 @@ def get_doc_writeup(doc):
writeup = 'This document has no writeup'
if doc.type_id == 'draft':
latest = doc.latest_event(WriteupDocEvent, type='changed_ballot_writeup_text')
if latest and doc.has_rfc_editor_note():
rfced_note = doc.latest_event(WriteupDocEvent, type="changed_rfc_editor_note_text")
writeup = latest.text + "\n\n" + rfced_note.text
else:
if latest:
writeup = latest.text
if doc.has_rfc_editor_note():
rfced_note = doc.latest_event(WriteupDocEvent, type="changed_rfc_editor_note_text")
writeup = writeup + "\n\n" + rfced_note.text
if doc.type_id == 'charter':
latest = doc.latest_event(WriteupDocEvent, type='changed_ballot_writeup_text')
if latest: