From 8b452f95cb005eb9bb38ebb211490f75f67392ae Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Thu, 2 May 2013 13:26:36 +0000 Subject: [PATCH] 6641: Complete Individual Report crashes gramps svn: r22141 --- gramps/plugins/textreport/indivcomplete.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/textreport/indivcomplete.py b/gramps/plugins/textreport/indivcomplete.py index cecea87b7..3b15ffa2f 100644 --- a/gramps/plugins/textreport/indivcomplete.py +++ b/gramps/plugins/textreport/indivcomplete.py @@ -484,12 +484,13 @@ class IndivCompleteReport(Report): if the user option is set. """ event_list = [] - for event_ref in event_ref_list: + for ind, event_ref in enumerate(event_ref_list): if event_ref: event = self.database.get_event_from_handle(event_ref.ref) if event: sort_value = event.get_date_object().get_sort_value() - event_list.append((sort_value, event_ref, event)) + #first sort on date, equal dates, then sort as in GUI. + event_list.append((str(sort_value) + "%04i"%ind, event_ref, event)) if self.sort: event_list.sort()