Fix #2101434 [KeyError: 11895 : when trying to open AUTHORS](https://bugs.launchpad.net/calibre/+bug/2101434)

This commit is contained in:
Kovid Goyal 2025-03-09 09:06:43 +05:30
parent ff9bcc93bf
commit eda6dcb7e3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -222,7 +222,7 @@ class EditAuthorsDialog(QDialog, Ui_EditAuthorsDialog):
name = v['name'] name = v['name']
name = name.replace('|', ',') name = name.replace('|', ',')
self.completion_data.append(name) self.completion_data.append(name)
vals = {'name': name, 'sort': v['sort'], 'link': v['link'], 'count':counts[id_]} vals = {'name': name, 'sort': v['sort'], 'link': v['link'], 'count':counts.get(id_, 0)}
self.authors[id_] = vals self.authors[id_] = vals
self.original_authors[id_] = vals.copy() self.original_authors[id_] = vals.copy()