mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-10 18:54:53 +01:00
Correct implementation of case in _set_authors
This commit is contained in:
parent
9036dd83d7
commit
fa0d8db045
1 changed files with 5 additions and 2 deletions
|
|
@ -1642,8 +1642,11 @@ def _set_authors(self, id, authors, allow_case_change=False):
|
|||
a = a.strip().replace(',', '|')
|
||||
if not isinstance(a, unicode):
|
||||
a = a.decode(preferred_encoding, 'replace')
|
||||
author_id, name = \
|
||||
self.conn.get('SELECT id, name from authors WHERE name=?', (a,))[0]
|
||||
aus = self.conn.get('SELECT id, name from authors WHERE name=?', (a,))
|
||||
if aus:
|
||||
author_id, name = aus[0]
|
||||
else:
|
||||
author_id, name = (None, None)
|
||||
if author_id:
|
||||
aid = author_id
|
||||
# Handle change of case
|
||||
|
|
|
|||
Loading…
Reference in a new issue