From ba42df27063884c1c29840327ac537476b7d8eaa Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Sat, 12 Mar 2011 04:45:35 +0000 Subject: [PATCH] Bug#4692; NarrativeWeb: crash generating the event pages in ctor on ltr = unicode(evt_type)[0].capitalize() - string index out of range svn: r16810 --- src/plugins/webreport/NarrativeWeb.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index a76fe7d9a..73c2092eb 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -2735,11 +2735,13 @@ class EventListPage(BasePage): # family event if _type in _EVENTMAP: - handle_list = db.find_backlink_handles(event_handle, include_classes = ['Family']) + handle_list = db.find_backlink_handles(event_handle, + include_classes = ['Family']) # personal event else: - handle_list = db.find_backlink_handles(event_handle, include_classes = ['Person']) + handle_list = db.find_backlink_handles(event_handle, + include_classes = ['Person']) if handle_list: trow = Html("tr") @@ -2749,7 +2751,11 @@ class EventListPage(BasePage): tcell = Html("td", class_ = "ColumnLetter", inline = True) trow += tcell - ltr = unicode(evt_type)[0].capitalize() + if evt_type: + ltr = unicode(evt_type)[0].capitalize() + else: + ltr = " " + if first_letter: trow.attr = 'class = "BeginLetter"' tcell += Html("a", ltr, name = ltr,