Fixed error in setting None values
svn: r9381
This commit is contained in:
parent
5975600e6a
commit
d692868ce0
@ -542,9 +542,18 @@ class Date:
|
||||
Sets the year, month, and day values by offset
|
||||
"""
|
||||
dv = list(self.dateval)
|
||||
dv[Date._POS_YR] += year
|
||||
dv[Date._POS_MON] += month
|
||||
dv[Date._POS_DAY] += day
|
||||
if dv[Date._POS_YR]:
|
||||
dv[Date._POS_YR] += year
|
||||
elif year:
|
||||
dv[Date._POS_YR] = year
|
||||
if dv[Date._POS_MON]:
|
||||
dv[Date._POS_MON] += month
|
||||
elif month:
|
||||
dv[Date._POS_MON] = month
|
||||
if dv[Date._POS_DAY]:
|
||||
dv[Date._POS_DAY] += day
|
||||
elif day:
|
||||
dv[Date._POS_DAY] = day
|
||||
self.dateval = tuple(dv)
|
||||
self._calc_sort_value()
|
||||
|
||||
|
@ -69,8 +69,11 @@ class LivingProxyDb(ProxyDbBase):
|
||||
"""
|
||||
ProxyDbBase.__init__(self, db)
|
||||
self.mode = mode
|
||||
self.current_date = Date()
|
||||
self.current_date.set_year(current_year)
|
||||
if current_year != None:
|
||||
self.current_date = Date()
|
||||
self.current_date.set_year(current_year)
|
||||
else:
|
||||
self.current_date = None
|
||||
self.years_after_death = years_after_death
|
||||
|
||||
def get_person_from_handle(self, handle):
|
||||
|
Loading…
Reference in New Issue
Block a user