Skip to content

Commit 2215697

Browse files
dsblankGaryGriffin
authored andcommitted
Fix crash in IsFamilyFilterMatchEvent filter rule
The prepare() method built the matching event handle set in self.selected_handles but then tried to update self.events, an attribute that is never defined. This raised an AttributeError whenever the "Events of families matching a <family filter>" rule was applied, breaking the filter entirely. Reported at: https://gramps.discourse.group/t/crash-of-an-event-filter-using-a-functional-family-filter/9733
1 parent 35ee9ac commit 2215697

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

FilterRules/isfamilyfiltermatchevent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def prepare(self, db: Database, user):
9292
if self.MFF:
9393
for family in db.iter_families():
9494
if self.MFF.apply_to_one(db, family):
95-
self.events.update([e.ref for e in family.get_event_ref_list()])
95+
self.selected_handles.update(
96+
[e.ref for e in family.get_event_ref_list()]
97+
)
9698

9799
def apply_to_one(self, db: Database, event: Event) -> bool:
98100
"""

0 commit comments

Comments
 (0)