diff --git a/cg/meta/upload/scout/uploadscoutapi.py b/cg/meta/upload/scout/uploadscoutapi.py index 17ec5b4492..f08a75e2f1 100644 --- a/cg/meta/upload/scout/uploadscoutapi.py +++ b/cg/meta/upload/scout/uploadscoutapi.py @@ -398,7 +398,10 @@ def upload_omics_sample_id_to_scout( ) def upload_rna_fraser_outrider_to_scout( - self, dry_run: bool, case_id: str, rna_dna_collections: list[RNADNACollection], cust_id: str + self, + dry_run: bool, + case_id: str, + rna_dna_collections: list[RNADNACollection], ) -> None: """Upload omics fraser and outrider file for a case to Scout.""" status_db: Store = self.status_db @@ -430,7 +433,7 @@ def upload_rna_fraser_outrider_to_scout( outrider_file_path=rna_outrider.full_path, case_id=dna_case_id, customer_case_name=customer_case.name, - cust_id=cust_id, + cust_id=customer_case.customer.internal_id, ) for upload_statement in self.get_rna_fraser_outrider_upload_summary(rna_dna_collections): LOG.info(upload_statement) @@ -441,7 +444,6 @@ def upload_rna_genome_build_to_scout( dry_run: bool, rna_case: str, rna_dna_collections: list[RNADNACollection], - cust_id: str, ) -> None: """Upload RNA genome built for a RNA/DNA case to Scout.""" status_db: Store = self.status_db @@ -463,7 +465,7 @@ def upload_rna_genome_build_to_scout( self.scout_api.upload_rna_genome_build( case_id=dna_case_id, customer_case_name=customer_case.name, - cust_id=cust_id, + cust_id=customer_case.customer.internal_id, rna_genome_build=rna_genome_build, ) @@ -614,7 +616,6 @@ def upload_rna_omics_to_scout(self, dry_run: bool, case_id: str) -> None: status_db: Store = self.status_db rna_case = status_db.get_case_by_internal_id(case_id) rna_dna_collections: list[RNADNACollection] = self.create_rna_dna_collections(rna_case) - cust_id: str = rna_case.customer.internal_id self.upload_omics_sample_id_to_scout( dry_run=dry_run, rna_dna_collections=rna_dna_collections ) @@ -622,13 +623,11 @@ def upload_rna_omics_to_scout(self, dry_run: bool, case_id: str) -> None: dry_run=dry_run, case_id=case_id, rna_dna_collections=rna_dna_collections, - cust_id=cust_id, ) self.upload_rna_genome_build_to_scout( dry_run=dry_run, rna_case=rna_case, rna_dna_collections=rna_dna_collections, - cust_id=cust_id, ) self.load_rna_variant_outlier_to_scout( dry_run=dry_run, rna_dna_collections=rna_dna_collections