Skip to content

Commit 779da45

Browse files
committed
fix db commit
1 parent 2c84374 commit 779da45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cg/apps/downsample/downsample.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def add_downsampled_sample_entry_to_statusdb(self) -> Sample:
6464
f"Customer set to: {downsampled_sample.customer}"
6565
)
6666
if not self.dry_run:
67-
self.status_db.session.add_commit(downsampled_sample)
67+
self.status_db.session.commit(downsampled_sample)
6868
LOG.info(f"Added {downsampled_sample.name} to StatusDB.")
6969
return downsampled_sample
7070
return downsampled_sample
@@ -92,12 +92,12 @@ def _link_downsampled_sample_to_case(self, sample: Sample, case: Family) -> None
9292
sample=sample,
9393
status=self.downsample_data.sample_status(sample=sample),
9494
)
95-
self.status_db.session.add_commit(sample_case_link)
95+
self.status_db.session.commit(sample_case_link)
9696
LOG.info(f"Related sample {sample.internal_id} to {case.internal_id}")
9797

9898
def add_downsampled_sample_case_to_statusdb(self) -> None:
9999
"""
100-
Add the down sampled sample and case to statusDB and generate the sample case link.
100+
Add the downsampled sample and case to statusDB and generate the sample case link.
101101
"""
102102
self.add_downsampled_sample_entry_to_statusdb()
103103
self.add_downsampled_case_to_statusdb()

0 commit comments

Comments
 (0)