Skip to content

Commit f7cef22

Browse files
committed
Merge branch '558-radionuclides-backfill' of https://github.com/DataIntegrationGroup/OcotilloAPI into 558-radionuclides-backfill
2 parents 243f5cf + ae60c1f commit f7cef22

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

tests/features/steps/chemistry-backfill.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,20 +286,14 @@ def step_given_sample_with_chemistry_key(context: Context, sample_pt_id: str):
286286
def _snapshot_analysis_method_ids() -> set[int]:
287287
"""Return the set of all AnalysisMethod IDs that exist before the backfill."""
288288
with session_ctx() as session:
289-
return {
290-
row[0]
291-
for row in session.execute(select(AnalysisMethod.id)).all()
292-
}
289+
return {row[0] for row in session.execute(select(AnalysisMethod.id)).all()}
293290

294291

295292
def _track_created_analysis_methods(context: Context, pre_ids: set[int]):
296293
"""Record only AnalysisMethod IDs that were actually created by the backfill."""
297294
_ensure_backfill_tracking(context)
298295
with session_ctx() as session:
299-
post_ids = {
300-
row[0]
301-
for row in session.execute(select(AnalysisMethod.id)).all()
302-
}
296+
post_ids = {row[0] for row in session.execute(select(AnalysisMethod.id)).all()}
303297
new_ids = post_ids - pre_ids
304298
context._backfill_created["analysis_method_ids"] = list(new_ids)
305299

0 commit comments

Comments
 (0)