3131: sibling quickview doesn't reflect person view

svn: r15033
This commit is contained in:
Doug Blank
2010-04-05 02:53:32 +00:00
parent 35874b1145
commit 2842f8e8a5
8 changed files with 54 additions and 15 deletions

View File

@@ -683,6 +683,7 @@ class Date(object):
pass # source is ok
else:
raise AttributeError, "invalid args to Date: %s" % source
self.format = None
#### ok, process either date or tuple
if isinstance(source, tuple):
self.calendar = Date.CAL_GREGORIAN

View File

@@ -24,7 +24,7 @@
Functional database interface for getting events, or fallback events.
"""
def get_birth_or_fallback(db, person):
def get_birth_or_fallback(db, person, format=None):
"""
Get BIRTH event from a person, or fallback to an event around
the time of birth.
@@ -41,10 +41,12 @@ def get_birth_or_fallback(db, person):
if (event
and event.type.is_birth_fallback()
and event_ref.role.is_primary()):
if format:
event.date.format = format
return event
return None
def get_death_or_fallback(db, person):
def get_death_or_fallback(db, person, format=None):
"""
Get a DEATH event from a person, or fallback to an
event around the time of death.
@@ -61,5 +63,8 @@ def get_death_or_fallback(db, person):
if (event
and event.type.is_death_fallback()
and event_ref.role.is_primary()):
if format:
event.date.format = format
return event
return None