From: Jakob Cornell Date: Sat, 9 Oct 2021 20:36:48 +0000 (-0500) Subject: Fix error in database query X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ebdd4248ebff71643c59207a6694499b82a8c6c;p=eros.git Fix error in database query --- 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.*)" + ";" )