From 4b4e10c229c185ffbaa08226578fc9a765e1f280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Sun, 28 Oct 2012 13:49:18 +0000 Subject: [PATCH] 6133: private home note and privacy filter (patch by Serge Noiraud) svn: r20623 --- src/plugins/webreport/NarrativeWeb.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 7da4c11a7..9791e64b3 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -805,14 +805,16 @@ class BasePage(object): """ self.report.link_prefix_up = link_prefix_up - # retrieve the body of the note - note_text = note.get() + text = "" + if note is not None: + # retrieve the body of the note + note_text = note.get() - # styled notes - htmlnotetext = self.styled_note(note.get_styledtext(), - note.get_format(), contains_html = - note.get_type() == NoteType.HTML_CODE) - text = htmlnotetext or Html("p", note_text) + # styled notes + htmlnotetext = self.styled_note(note.get_styledtext(), + note.get_format(), contains_html = + note.get_type() == NoteType.HTML_CODE) + text = htmlnotetext or Html("p", note_text) # return text of the note to its callers return text