Add empty date for fallback wrapper in SimpleAccess where there is no event

svn: r15035
This commit is contained in:
Doug Blank 2010-04-05 12:38:04 +00:00
parent 201848dd82
commit d79961ff0b

View File

@ -528,8 +528,12 @@ class SimpleAccess(object):
""" """
if type(person) in [str, unicode]: if type(person) in [str, unicode]:
person = self.dbase.get_person_from_handle(person) person = self.dbase.get_person_from_handle(person)
return gen.utils.get_birth_or_fallback(self.dbase, event = gen.utils.get_birth_or_fallback(self.dbase,
person, "<i>%s</i>").date person, "<i>%s</i>")
if event:
return event.date
else:
return gen.lib.Date()
def birth_place(self, person): def birth_place(self, person):
""" """
@ -581,8 +585,12 @@ class SimpleAccess(object):
""" """
if type(person) in [str, unicode]: if type(person) in [str, unicode]:
person = self.dbase.get_person_from_handle(person) person = self.dbase.get_person_from_handle(person)
return gen.utils.get_death_or_fallback(self.dbase, event = gen.utils.get_death_or_fallback(self.dbase,
person, "<i>%s</i>").date person, "<i>%s</i>")
if event:
return event.date
else:
return gen.lib.Date()
def death_place(self, person): def death_place(self, person):
""" """