From 2a3352870c2a73d0090780748bee472ad490bda2 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Sun, 19 Aug 2012 19:21:46 +0530 Subject: [PATCH] Actually fix the sqlite query :-) --- headphones/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headphones/__init__.py b/headphones/__init__.py index 0dfde064..3126e793 100644 --- a/headphones/__init__.py +++ b/headphones/__init__.py @@ -901,8 +901,8 @@ def dbcheck(): logger.info("Copying over current artist IncludeExtras information") artists = c.execute('SELECT ArtistID, IncludeExtras from artists').fetchall() for artist in artists: - if artist['IncludeExtras']: - c.execute('INSERT into artists (Extras) VALUES ("1,2,3,4,5,6,7,8") WHERE ArtistID=' + artist['ArtistID']) + if artist[1]: + c.execute('UPDATE artists SET Extras=? WHERE ArtistID=?', ("1,2,3,4,5,6,7,8", artist[0])) conn.commit() c.close()