Skip to content

Commit fff2086

Browse files
SNoiraudNick-Hall
authored andcommitted
Fix narrative web when a person excluded by a proxy is referenced
Avoid crashes when we create associations or relationships for living people and the option "Living people:" is set to "Not included". Fixes #13556, #13412 and #13469.
1 parent ea8aafd commit fff2086

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

gramps/plugins/webreport/narrativeweb.py

+9
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,15 @@ def _build_obj_dict(self):
653653
self._add_person(handle, "", "")
654654
step()
655655
index += 1
656+
# The following lines are used to avoid crashes when we create associations or
657+
# relationships for living people. The option "Living people:" is set to "Not included"
658+
for person_handle in list(self.obj_dict[Person].keys()):
659+
result = self.obj_dict[Person][person_handle]
660+
if not isinstance(result, tuple) or len(result) != 3:
661+
LOG.debug(
662+
f"Removing living person_handle: {person_handle} because we don't want it."
663+
)
664+
del self.obj_dict[Person][person_handle]
656665

657666
LOG.debug(
658667
"final object dictionary \n"

0 commit comments

Comments
 (0)