diff --git a/models/tea/jobs.py b/models/tea/jobs.py index ecf6865..96d2f22 100644 --- a/models/tea/jobs.py +++ b/models/tea/jobs.py @@ -163,7 +163,8 @@ def association_cohort(as_of: date | None = None) -> tuple[pd.DataFrame, pd.Data css = None if evaluated and r["birth_date"]: row = {**a, "evaluation_date": date.fromisoformat(evaluated)} - css, _ = ados2.score(row, date.fromisoformat(r["birth_date"])) + scored = ados2.score(row, date.fromisoformat(r["birth_date"])) + css = scored and scored.css rows.append({"key": r["edf"], "person": r["person_id"], "age_months": r["age_months"], "module": a.get("module"), "css": css, **{n: a.get(n) for n, _ in relation.ITEMS.values()},