From 01afd075a75d061214529280b05674c12d34a79f Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Thu, 9 Sep 2010 11:15:28 +0000 Subject: [PATCH] 4131: [NarWeb] No clickable link in referenced region in the photo, if person has no name svn: r15860 --- src/plugins/webreport/NarrativeWeb.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 07d1fef4f..2c12ffe9a 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -1325,6 +1325,8 @@ class BasePage(object): _name = _obj.get_primary_name().get_call_name() if not _name: _name = _obj.get_primary_name().get_first_name() + if not _name: + _name = _("Unknown") _linkurl = self.report.build_url_fname_html(_obj.handle, "ppl", True) elif classname == "Family": _obj = db.get_family_from_handle( newhandle ) @@ -1344,14 +1346,20 @@ class BasePage(object): _linkurl = self.report.build_url_fname_html(partner1_handle, "ppl", True) elif partner2: _name = partner2.get_primary_name().get_first_name() - _linkurl = self.report.build_url_fname_html(partner2_handle, "ppl", True) + _linkurl = self.report.build_url_fname_html(partner2_handle, "ppl", True) + if not _name: + _name = _("Unknown") elif classname == "Event": _obj = db.get_event_from_handle( newhandle ) _name = _obj.get_description() + if not _name: + _name = _("Unknown") _linkurl = self.report.build_url_fname_html(_obj.handle, "evt", True) elif classname == "Place": _obj = db.get_place_from_handle(newhandle) _name = ReportUtils.place_name(db, newhandle) + if not _name: + _name = _("Unknown") _linkurl = self.report.build_url_fname_html(newhandle, "plc", True) # continue looking through the loop for an object...