From 292a7a3c88a98348948913e30334cbc88adf670f Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Thu, 14 Jul 2022 01:29:37 +0000 Subject: [PATCH] little refactor in update_feed_items method --- database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database.py b/database.py index d0c1c48..4ea6a67 100644 --- a/database.py +++ b/database.py @@ -150,7 +150,7 @@ class Database: """Replace last feed items with a list items that receive.""" self.log.debug('update_feed_items(feed_id=\'%s\', new_items=list(%d))', feed_id, len(new_items)) for i, _ in enumerate(new_items): - new_items[i] = [feed_id] + [new_items[i].url, new_items[i].guid] + new_items[i] = [feed_id, new_items[i].url, new_items[i].guid] self.cur.execute('DELETE FROM feeds_last_items WHERE feed_id = %s', [feed_id]) self.cur.executemany( 'INSERT INTO feeds_last_items (feed_id, url, guid) VALUES (%s, %s, %s)', new_items)