Site
Gitweb
Static
projects
/
eros.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
910f1f2
)
Fix error in database query
author
Jakob Cornell
<jakob+gpg@jcornell.net>
Sat, 9 Oct 2021 20:36:48 +0000
(15:36 -0500)
committer
Jakob Cornell
<jakob+gpg@jcornell.net>
Sat, 9 Oct 2021 20:36:48 +0000
(15:36 -0500)
python/scripts/ingest_ptp_json.py
patch
|
blob
|
history
diff --git
a/python/scripts/ingest_ptp_json.py
b/python/scripts/ingest_ptp_json.py
index 9de03808129cd3599a312039d1d9d13e298b9554..a8be0bdb49b300c0500e8bd0c84c9986a79328bb 100644
(file)
--- 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.*)"
+ ";"
)