Fix bug in new bulk tag edit function when adding already existing tags

This commit is contained in:
Kovid Goyal 2010-08-18 12:24:58 -06:00
parent 36fe291ceb
commit 99b0d8f2b9
2 changed files with 2 additions and 2 deletions

View File

@ -377,7 +377,7 @@ class CustomColumns(object):
if add: if add:
self.conn.execute( self.conn.execute(
''' '''
INSERT INTO {0}(book, value) SELECT {1}.id, {2}.id FROM {1}, {2} INSERT OR REPLACE INTO {0}(book, value) SELECT {1}.id, {2}.id FROM {1}, {2}
'''.format(link_table, temp_tables[0], temp_tables[1]) '''.format(link_table, temp_tables[0], temp_tables[1])
) )
# get rid of the temp tables # get rid of the temp tables

View File

@ -1434,7 +1434,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
if add: if add:
self.conn.execute( self.conn.execute(
''' '''
INSERT INTO books_tags_link(book, tag) SELECT {0}.id, {1}.id FROM INSERT OR REPLACE INTO books_tags_link(book, tag) SELECT {0}.id, {1}.id FROM
{0}, {1} {0}, {1}
'''.format(tables[0], tables[1]) '''.format(tables[0], tables[1])
) )