Commit a2136d7
CalculateEstimatedDates: handle ancestry-loop DatabaseError per-person (bug 0007898)
probably_alive_range raises DatabaseError when it detects loops in
ancestor or descendant chains. Previously this propagated out of the
removal, selection, and apply loops and tore down the entire tool,
leaving signals disabled and the progress dialog stuck open.
Wrap each per-person iteration with try/except so a single bad record
is logged and skipped, and add outer try/finally blocks so signals are
re-enabled and the progress dialog is closed even on unexpected
failures. Surface a "Skipped N people due to errors" message to the
user when any rows were skipped.
Add unit tests covering get_modifier branches, calc_estimates happy
path, DatabaseError propagation from calc_estimates, and .gpr.py
registration metadata. The addon module is loaded lazily inside a
fixture so pytest collection succeeds even when the GUI stack cannot
import.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 4f0d7ba commit a2136d7
2 files changed
Lines changed: 456 additions & 188 deletions
0 commit comments