From c3ba4417cb0b0cf83eb4113293b3021dd1d1d00e Mon Sep 17 00:00:00 2001 From: Martin Beracochea Date: Fri, 16 Feb 2024 14:36:08 +0000 Subject: [PATCH] Send the sequence_accession, not a Run object --- emgapi/management/commands/populate_metagenomics_exchange.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emgapi/management/commands/populate_metagenomics_exchange.py b/emgapi/management/commands/populate_metagenomics_exchange.py index 937f8613a..294336775 100644 --- a/emgapi/management/commands/populate_metagenomics_exchange.py +++ b/emgapi/management/commands/populate_metagenomics_exchange.py @@ -129,13 +129,13 @@ def process_to_index_and_update_records(self, analyses_to_index_and_update): response = self.mgx_api.add_analysis( mgya=annotation_job.accession, - sequence_accession=annotation_job.run, + sequence_accession=sequence_accession, ) if response.ok: logging.info(f"Successfully added {annotation_job}") registry_id, metadata_match = self.mgx_api.check_analysis( mgya=annotation_job.accession, - sequence_id=annotation_job.run, + sequence_id=sequence_accession, ) annotation_job.mgx_accession = registry_id annotation_job.last_mgx_indexed = timezone.now() + timedelta(