* src/GenericFilter.py: rewrote IsAncestorOf and IsDescendantOf rules

to be more efficient and to properly handle loop detection.
* src/RelLib.py: Added the getValidDeath and getValidBirth methods to
the Person class


svn: r1710
This commit is contained in:
Don Allingham
2003-06-12 02:04:42 +00:00
parent 91b3c84bee
commit 57bd52fd17
4 changed files with 85 additions and 54 deletions

View File

@ -1121,6 +1121,26 @@ class Person(Persistent):
self.death.name = "Death"
return self.death
def getValidDeath(self):
e = self.death
if e == None:
return None
if e.place == None and (e.date == None or not e.date.getValid()) and \
e.description == "" and e.cause == "" and e.witness == None:
return None
else:
return e
def getValidBirth(self):
e = self.birth
if e == None:
return None
if e.place == None and (e.date == None or not e.date.getValid()) and \
e.description == "" and e.cause == "" and e.witness == None:
return None
else:
return e
def addPhoto(self,photo):
"""adds a Photo instance to the image list"""
self.photoList.append(photo)