* 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:
@ -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)
|
||||
|
Reference in New Issue
Block a user