fix(import): align child-parent pedigree mapping by using name cell row for vertical alignment
Some checks failed
CI / Backend Tests (.NET) (push) Successful in 1m9s
CI / Docker Build & Push (push) Has been cancelled
CI / Frontend Tests (Node/Vite) (push) Has been cancelled

This commit is contained in:
2026-06-21 22:11:53 +02:00
parent b53b8cf2ff
commit 4cb39cb180
3 changed files with 19 additions and 5 deletions

View File

@@ -882,17 +882,29 @@ def main():
m_dob = parse_date(mother_ref.get("dob"))
for p_cand in stammbaum_only_animals:
p_gender = str(p_cand.get("gender") or "").lower().strip()
if p_gender in ["w", "f", "female", "weiblich"]:
continue
p_dob = parse_date(p_cand.get("dob"))
if dob_val and p_dob and p_dob >= dob_val:
continue
cand_call_norm = normalize_name(get_call_name(p_cand["name"])) or "unbekannt"
cand_name_norm = normalize_name(p_cand["name"]) or "unbekannt"
if cand_call_norm == normalize_name(f_name) or cand_name_norm == normalize_name(f_name):
if not f_dob or parse_date(p_cand.get("dob")) == f_dob:
if not f_dob or p_dob == f_dob:
f_scoped_id = generate_guid(f"stammbaum-animal-{p_cand['id']}")
break
for p_cand in stammbaum_only_animals:
p_gender = str(p_cand.get("gender") or "").lower().strip()
if p_gender in ["m", "male", "männlich"]:
continue
p_dob = parse_date(p_cand.get("dob"))
if dob_val and p_dob and p_dob >= dob_val:
continue
cand_call_norm = normalize_name(get_call_name(p_cand["name"])) or "unbekannt"
cand_name_norm = normalize_name(p_cand["name"]) or "unbekannt"
if cand_call_norm == normalize_name(m_name) or cand_name_norm == normalize_name(m_name):
if not m_dob or parse_date(p_cand.get("dob")) == m_dob:
if not m_dob or p_dob == m_dob:
m_scoped_id = generate_guid(f"stammbaum-animal-{p_cand['id']}")
break