Narweb: Private notes for home, intro and contact (#953)

If the notes are private, we can't use them in these pages.
This commit is contained in:
Serge Noiraud 2020-01-09 19:09:25 +01:00 committed by Paul Culley
parent d693881b98
commit 06cb9d7ea6
4 changed files with 19 additions and 14 deletions

View File

@ -126,6 +126,7 @@ class ContactPage(BasePage):
note_id = report.options['contactnote']
if note_id:
note = self.r_db.get_note_from_gramps_id(note_id)
if note:
note_text = self.get_note_format(note, False)
# attach note

View File

@ -87,8 +87,10 @@ class HomePage(BasePage):
section += homeimg
note_id = report.options['homenote']
ldatec = None
if note_id:
note = self.r_db.get_note_from_gramps_id(note_id)
if note:
note_text = self.get_note_format(note, False)
# attach note

View File

@ -87,8 +87,10 @@ class IntroductionPage(BasePage):
section += introimg
note_id = report.options['intronote']
ldatec = None
if note_id:
note = self.r_db.get_note_from_gramps_id(note_id)
if note:
note_text = self.get_note_format(note, False)
# attach note

View File

@ -1453,7 +1453,7 @@ class NavWebReport(Report):
output_file.close()
else:
output_file.close()
if date > 0:
if date is not None and date > 0:
os.utime(output_file.name, (date, date))
def prepare_copy_media(self, photo):