From 8ebdd4248ebff71643c59207a6694499b82a8c6c Mon Sep 17 00:00:00 2001 From: Jakob Cornell Date: Sat, 9 Oct 2021 15:36:48 -0500 Subject: [PATCH] Fix error in database query --- python/scripts/ingest_ptp_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/scripts/ingest_ptp_json.py b/python/scripts/ingest_ptp_json.py index 9de0380..a8be0bd 100644 --- a/python/scripts/ingest_ptp_json.py +++ b/python/scripts/ingest_ptp_json.py @@ -23,7 +23,7 @@ def ingest(doc, db_cursor): for group in doc["Movies"]: stmt = ( "insert into ptp.torrent_group (id, title, year, imdb_id)" - + " values (%s, %s, %s, %s, %s)" + + " values (%s, %s, %s, %s)" + " on conflict (id) do update set (id, title, year, imdb_id) = row(excluded.*)" + ";" ) -- 2.30.2