From cfeb97a5243cef525bf9bef2e2c475e9ed6365b6 Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Mon, 28 Mar 2016 14:19:33 +0200 Subject: [PATCH] 9347: Places index + Media index are incorrectly sorted --- gramps/plugins/webreport/narrativeweb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gramps/plugins/webreport/narrativeweb.py b/gramps/plugins/webreport/narrativeweb.py index 10bf6c44e..5fb4e94d7 100644 --- a/gramps/plugins/webreport/narrativeweb.py +++ b/gramps/plugins/webreport/narrativeweb.py @@ -4450,7 +4450,7 @@ class MediaPages(BasePage): len(self.report.obj_dict[MediaObject]) + 1) as step: # bug 8950 : it seems it's better to sort on desc + gid. def sort_by_desc_and_gid(obj): - return (obj.desc, obj.gramps_id) + return (obj.desc.lower(), obj.gramps_id) sorted_media_handles = sorted(self.report.obj_dict[MediaObject].keys(), key=lambda x: sort_by_desc_and_gid(self.report.database.get_object_from_handle(x)))