mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix 807256: TypeError:list of indices must be integers, not unicode
This commit is contained in:
parent
dd62e49a87
commit
5174e5ca74
@ -446,9 +446,8 @@ class EditMetadataAction(InterfaceAction):
|
||||
if d.result() == d.Accepted:
|
||||
to_rename = d.to_rename # dict of new text to old ids
|
||||
to_delete = d.to_delete # list of ids
|
||||
for text in to_rename:
|
||||
for old_id in to_rename[text]:
|
||||
model.rename_collection(old_id, new_name=unicode(text))
|
||||
for old_id, new_name in to_rename.iteritems():
|
||||
model.rename_collection(old_id, new_name=unicode(new_name))
|
||||
for item in to_delete:
|
||||
model.delete_collection_using_id(item)
|
||||
self.gui.upload_collections(model.db, view=view, oncard=oncard)
|
||||
|
@ -218,7 +218,7 @@ class TagBrowserMixin(object): # {{{
|
||||
d = TagListEditor(self, tag_to_match=tag, data=result, key=key)
|
||||
d.exec_()
|
||||
if d.result() == d.Accepted:
|
||||
to_rename = d.to_rename # dict of new text to old id
|
||||
to_rename = d.to_rename # dict of old id to new name
|
||||
to_delete = d.to_delete # list of ids
|
||||
orig_name = d.original_names # dict of id: name
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user