From 1ab92afebd7f3d023f3937925f24b16cd5bd55cf Mon Sep 17 00:00:00 2001 From: MarvinDo Date: Mon, 19 Aug 2024 10:41:08 +0200 Subject: [PATCH] improved clinvar upload handling --- .../webapp/utils/upload_status_checker.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/frontend_celery/webapp/utils/upload_status_checker.py b/src/frontend_celery/webapp/utils/upload_status_checker.py index d6b5f513..9aed14e3 100644 --- a/src/frontend_celery/webapp/utils/upload_status_checker.py +++ b/src/frontend_celery/webapp/utils/upload_status_checker.py @@ -39,10 +39,14 @@ def check_update_clinvar_status(variant_id, publish_queue_ids_oi: list, conn: Co clinvar_queue_entries = conn.get_clinvar_queue_entries(publish_queue_ids_oi, variant_id) # update the respective needs_upload field if a submission chaged to success + needs_clinvar_upload = False for clinvar_queue_entry in clinvar_queue_entries: - if clinvar_queue_entry[3] in ["success", "processed"]: - consensus_classification_id = clinvar_queue_entry[9] - conn.update_consensus_classification_needs_clinvar_upload(consensus_classification_id) + if clinvar_queue_entry[3] in ["error"]: #["success", "processed"]: + needs_clinvar_upload = True + + if not needs_clinvar_upload: + consensus_classification_id = clinvar_queue_entry[9] + conn.update_consensus_classification_needs_clinvar_upload(consensus_classification_id) return clinvar_queue_entries