You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(admin): flag missing project PI/Co-PI in data health; fix get_pis/get_co_pis (#1182)
Add a read-only "project-leadership" data-health check that flags projects
with no PI on record, or ongoing projects whose PI role(s) have all ended
(no currently-active PI). Co-PI absence is surfaced as context but not
flagged, since many projects legitimately have only a PI.
Also fix Project.get_pis()/get_co_pis(), which filtered on a nonexistent
"pi_member" field (the real field is lead_project_role) and so raised
FieldError on any call. They now filter on lead_project_role and return a
deduplicated QuerySet of Person objects as their docstrings promise. No
callers existed, so changing the return type from person IDs to Person
objects is safe.
Adds regression tests for the new check and for get_pis/get_co_pis.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments