mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bug in new bulk tag edit function when adding already existing tags
This commit is contained in:
parent
36fe291ceb
commit
99b0d8f2b9
@ -377,7 +377,7 @@ class CustomColumns(object):
|
||||
if add:
|
||||
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])
|
||||
)
|
||||
# get rid of the temp tables
|
||||
|
@ -1434,7 +1434,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
||||
if add:
|
||||
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}
|
||||
'''.format(tables[0], tables[1])
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user