← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] ~andersson123/autopkgtest-cloud:sqlite-writer-duplicate-results-fix into autopkgtest-cloud:master

 

Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:sqlite-writer-duplicate-results-fix into autopkgtest-cloud:master.

Requested reviews:
  Canonical's Ubuntu QA (canonical-ubuntu-qa)

For more details, see:
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/462303
-- 
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:sqlite-writer-duplicate-results-fix into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-web/webcontrol/sqlite-writer b/charms/focal/autopkgtest-web/webcontrol/sqlite-writer
index e6f0a3a..d0ec23a 100755
--- a/charms/focal/autopkgtest-web/webcontrol/sqlite-writer
+++ b/charms/focal/autopkgtest-web/webcontrol/sqlite-writer
@@ -92,7 +92,7 @@ def process_message(msg, db_con):
         c = db_con.cursor()
         c.execute(
             (
-                "INSERT INTO result(test_id, run_id, version, triggers, duration, "
+                "INSERT OR REPLACE INTO result(test_id, run_id, version, triggers, duration, "
                 "exitcode, requester, env, uuid) VALUES (:test_id, :run_id, "
                 ":version, :triggers, :duration, :exitcode, :requester, :env, :uuid)"
             ),