2803: 'Check & Repair Database' failed at stage: 'Checking families for proper date formats'
svn: r12301
This commit is contained in:
parent
6470c49eda
commit
ad71da397f
@ -887,24 +887,27 @@ class CheckIntegrity:
|
|||||||
# Check dates to see if correct format:
|
# Check dates to see if correct format:
|
||||||
for source in source_list:
|
for source in source_list:
|
||||||
(date, private, note_list, confidence, sref, page) = source
|
(date, private, note_list, confidence, sref, page) = source
|
||||||
if len(date) == 7:
|
if date is None:
|
||||||
# This is correct:
|
new_date = None
|
||||||
(calendar, modifier, quality, dateval, text, sortval,
|
|
||||||
newyear) = date
|
|
||||||
elif len(date) == 6:
|
|
||||||
# This is necessary to fix 3.1.0 bug:
|
|
||||||
(calendar, modifier, quality, dateval, text, sortval) = date
|
|
||||||
newyear = 0
|
|
||||||
need_to_fix = True
|
|
||||||
else:
|
else:
|
||||||
# FIXME: What to do with an invalid date?
|
if len(date) == 7:
|
||||||
# Make a new one?
|
# This is correct:
|
||||||
(calendar, modifier, quality, dateval, text, sortval,
|
(calendar, modifier, quality, dateval, text, sortval,
|
||||||
newyear) = gen.lib.Date().serialize()
|
newyear) = date
|
||||||
need_to_fix = True
|
elif len(date) == 6:
|
||||||
# Put date back together:
|
# This is necessary to fix 3.1.0 bug:
|
||||||
new_date = (calendar, modifier, quality, dateval, text, sortval,
|
(calendar, modifier, quality, dateval, text, sortval) = date
|
||||||
newyear)
|
newyear = 0
|
||||||
|
need_to_fix = True
|
||||||
|
else:
|
||||||
|
# FIXME: What to do with an invalid date?
|
||||||
|
# Make a new one?
|
||||||
|
(calendar, modifier, quality, dateval, text, sortval,
|
||||||
|
newyear) = gen.lib.Date().serialize()
|
||||||
|
need_to_fix = True
|
||||||
|
# Put date back together:
|
||||||
|
new_date = (calendar, modifier, quality, dateval, text, sortval,
|
||||||
|
newyear)
|
||||||
# Put source_list together:
|
# Put source_list together:
|
||||||
new_source_list.append((new_date, private, note_list, confidence, sref, page))
|
new_source_list.append((new_date, private, note_list, confidence, sref, page))
|
||||||
# Put new_person_ref together:
|
# Put new_person_ref together:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user