mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
687e905670
@ -515,7 +515,8 @@ class ManyToManyTable(ManyToOneTable):
|
|||||||
if existing_item is None or existing_item == item_id:
|
if existing_item is None or existing_item == item_id:
|
||||||
# A simple rename will do the trick
|
# A simple rename will do the trick
|
||||||
self.id_map[item_id] = new_name
|
self.id_map[item_id] = new_name
|
||||||
db.execute(f'UPDATE {table} SET {col}=? WHERE id=?', (new_name, item_id))
|
nn = self.serialize(new_name) if self.serialize else new_name
|
||||||
|
db.execute(f'UPDATE {table} SET {col}=? WHERE id=?', (nn, item_id))
|
||||||
else:
|
else:
|
||||||
# We have to replace
|
# We have to replace
|
||||||
new_id = existing_item
|
new_id = existing_item
|
||||||
|
Loading…
x
Reference in New Issue
Block a user