Skip to content

Commit

Permalink
run_id is tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
backmari committed Aug 30, 2024
1 parent 450fb4d commit 75c0f44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/utils/db_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 75c0f44

Please sign in to comment.