Add empty date for fallback wrapper in SimpleAccess where there is no event
svn: r15035
This commit is contained in:
parent
201848dd82
commit
d79961ff0b
@ -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):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user