From f4dc2a1ff59dab65a43ee006f0b2368f487d3c61 Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Wed, 23 Aug 2017 11:59:41 +0200 Subject: [PATCH] After the patch for loop, some missing references Fixes #010168 --- gramps/plugins/webreport/narrativeweb.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gramps/plugins/webreport/narrativeweb.py b/gramps/plugins/webreport/narrativeweb.py index 2fd6dc9b7..0c2fc8889 100644 --- a/gramps/plugins/webreport/narrativeweb.py +++ b/gramps/plugins/webreport/narrativeweb.py @@ -835,7 +835,9 @@ class NavWebReport(Report): @param: bkref_handle -- The handle associated to this source """ if len(self.obj_dict[Source][source_handle]) > 0: - return + for bkref in self.bkref_dict[Source][source_handle]: + if bkref_handle == bkref[1]: + return source = self._db.get_source_from_handle(source_handle) source_name = source.get_title() #if isinstance(source_name, bytes): @@ -870,7 +872,9 @@ class NavWebReport(Report): @param: bkref_handle -- The handle associated to this citation """ if len(self.obj_dict[Citation][citation_handle]) > 0: - return + for bkref in self.bkref_dict[Citation][citation_handle]: + if bkref_handle == bkref[1]: + return citation = self._db.get_citation_from_handle(citation_handle) # If Page is none, we want to make sure that a tuple is generated for # the source backreference @@ -901,7 +905,9 @@ class NavWebReport(Report): @param: bkref_handle -- The handle associated to this media """ if len(self.obj_dict[Media][media_handle]) > 0: - return + for bkref in self.bkref_dict[Media][media_handle]: + if bkref_handle == bkref[1]: + return media_refs = self.bkref_dict[Media].get(media_handle) if media_refs and (bkref_class, bkref_handle) in media_refs: return @@ -940,7 +946,9 @@ class NavWebReport(Report): @param: bkref_handle -- The handle associated to this source """ if len(self.obj_dict[Repository][repos_handle]) > 0: - return + for bkref in self.bkref_dict[Repository][repos_handle]: + if bkref_handle == bkref[1]: + return repos = self._db.get_repository_from_handle(repos_handle) repos_name = repos.name if self.inc_repository: