Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new filter rule: DegreesOfSeperation #283

Merged

Conversation

Mattkmmr
Copy link
Member

The filter rule allows to filter for relatives by their degrees of seperation to the selected person. The code uses a modified version of the IsLessThanNthGenerationAncestorOf filter rule for ancestor and descandants calculation. It is also possible to include the partners of the descandants.

@prculley prculley merged commit 796cd57 into gramps-project:maintenance/gramps51 Feb 8, 2020
@Mattkmmr Mattkmmr deleted the degrees-of-seperation branch February 9, 2020 09:38
"""Get the handle of the starting person."""
pid = self.list[0]
person = self.db.get_person_from_gramps_id(pid)
root_handle = person.get_handle()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to make a test for no person here (None), in case the filter is in use with a different tree and root handle is not defined. See https://gramps-project.org/bugs/view.php?id=12426

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants