From 75c0f4477fd9784fb3ea359bad2e4f0d3b4c6807 Mon Sep 17 00:00:00 2001 From: Marie Backman Date: Fri, 30 Aug 2024 15:19:21 -0400 Subject: [PATCH] run_id is tuple --- tests/utils/db_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/utils/db_utils.py b/tests/utils/db_utils.py index 8f187bea..1dc80e86 100644 --- a/tests/utils/db_utils.py +++ b/tests/utils/db_utils.py @@ -33,7 +33,7 @@ def check_run_status_exist(db_connection, run_id, queue_name): """ cursor = db_connection.cursor() queue_id = get_status_queue_id(db_connection, queue_name) - cursor.execute("SELECT * FROM report_runstatus WHERE run_id_id = %s AND queue_id_id = %s", (run_id, queue_id)) + cursor.execute("SELECT * FROM report_runstatus WHERE run_id_id = %s AND queue_id_id = %s", (run_id[0], queue_id)) result = cursor.fetchone() is not None cursor.close() return result @@ -44,7 +44,7 @@ def clear_previous_runstatus(db_connection, run_id): Remove all previous run statuses for the given run_id :param psycopg2.Connection db_connection: database connection - :param int run_id: ID of the run in table datarun + :param tuple(int,) run_id: ID of the run in table datarun """ cursor = db_connection.cursor() # delete run from tables report_information, report_error and report_runstatus