2006-08-16 Alex Roitman <shura@gramps-project.org>

* src/plugins/Verify.py (Disconnected): Add verification rule;
	(Verify.run_tool): Use the new rule.
	* src/Filters/Rules/Person/_Disconnected.py (apply): Fix rule.



svn: r7188
This commit is contained in:
Alex Roitman 2006-08-16 18:40:10 +00:00
parent a9a3d9acbf
commit ccfa370c86
3 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-08-16 Alex Roitman <shura@gramps-project.org>
* src/plugins/Verify.py (Disconnected): Add verification rule;
(Verify.run_tool): Use the new rule.
* src/Filters/Rules/Person/_Disconnected.py (apply): Fix rule.
2006-08-15 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_WriteGedcom.py: support for AGE, CAUSE, and AGENCY
* src/GrampsDb/_ReadGedcom.py: support for AGE, CAUSE, and AGENCY

View File

@ -48,5 +48,5 @@ class Disconnected(Rule):
'to any other person in the database')
def apply(self,db,person):
return (len(person.get_main_parents_family_handle())
return (len(person.get_parent_family_handle_list())
+ len(person.get_family_handle_list()) == 0)

View File

@ -379,6 +379,7 @@ class Verify(Tool.Tool, ManagedWindow, UpdateCallback):
MarriedOften(self.db,person,wedder),
OldUnmarried(self.db,person,oldunm,estimate_age),
TooManyChildren(self.db,person,mxchilddad,mxchildmom),
Disconnected(self.db,person),
]
for rule in rule_list:
@ -1448,6 +1449,16 @@ class LargeChildrenAgeDiff(FamilyRule):
def get_message(self):
return _("Large age differences between children")
class Disconnected(PersonRule):
ID = 28
SEVERITY = Rule.WARNING
def broken(self):
return (len(self.obj.get_parent_family_handle_list())
+ len(self.obj.get_family_handle_list()) == 0)
def get_message(self):
return _("Disconnected individual")
#-------------------------------------------------------------------------
#
#