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
{{ message }}
Repository navigation
Chemistry backfill should handle missing Observation during note creation #565
Identified during review of #558 (558-radionuclides-backfill branch).
Problem
In chemistry_backfill.py, after the pg_insert upsert, the code looks up the just-upserted Observation using scalar_one() (line ~259). This can raise NoResultFound or MultipleResultsFound with no context about which GlobalID was being processed.
Fix
Replace scalar_one() with scalar_one_or_none() and add explicit error handling that includes the GlobalID in the error message. Append to result.errors and continue rather than crashing the entire backfill.
Activity
github-actions commentedon Feb 28, 2026
Linked Jira ticket created: BDMS-616
fix: harden chemistry backfill test cleanup