From 54ad8221e44d02727945c2a4a2a88e211b725fa4 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 12 Oct 2012 15:22:37 +0200 Subject: [PATCH] fix logic typo --- db_add.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db_add.py b/db_add.py index 779cb5d..abf06f8 100755 --- a/db_add.py +++ b/db_add.py @@ -48,11 +48,11 @@ def db_update_build(con, db_id, end, status): cur = con.cursor() cur.execute("SAVEPOINT a") try: - cur.execute("UPDATE jenkins_build SET build_end = '%s', status = '%s' WHERE id = %s RETURNING id" % (db_id, end, status)) + cur.execute("UPDATE jenkins_build SET build_end = '%s', status = '%s' WHERE id = %s RETURNING id" % (end, status, db_id)) con.commit() except psycopg2.DatabaseError as e: cur.execute("ROLLBACK TO a") # have to rollback after failed command - logger.debug("UPDATE jenkins_build SET build_end = '%s', status = '%s' WHERE id = %s RETURNING id" % (db_id, end, status)) + logger.debug("UPDATE jenkins_build SET build_end = '%s', status = '%s' WHERE id = %s RETURNING id" % (end, status, db_id)) return cur.fetchone()[0] def db_add_origin(con, origin): -- 2.39.5