Fix missing field in database insert, causing writes to fail

This commit is contained in:
Matěj Divecký 2023-08-17 14:18:08 +02:00
parent bcc0f1696e
commit 24f776a4b3

View file

@ -88,7 +88,7 @@ def process_diff(old, new, rss_id):
# print(old['link']) # print(old['link'])
# print(diff) # print(diff)
sql = "INSERT INTO diffs(article_id, feed_name, article_url, title_orig, title_new, diff_html, diff_time) VALUES (?,?,?,?,?,datetime('now', 'localtime'))" sql = "INSERT INTO diffs(article_id, feed_name, article_url, title_orig, title_new, diff_html, diff_time) VALUES (?,?,?,?,?,?,datetime('now', 'localtime'))"
sql_data = (new['article_id'], old['medium'], old['link'], old['title'], new['title'], html_diff) sql_data = (new['article_id'], old['medium'], old['link'], old['title'], new['title'], html_diff)
db.execute(sql, sql_data) db.execute(sql, sql_data)
db_con.commit() db_con.commit()